Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffGraphView.php
| <?php | <?php | ||||
| final class PHUIDiffGraphView extends Phobject { | final class PHUIDiffGraphView extends Phobject { | ||||
| private $isHead = true; | private $isHead = true; | ||||
| private $isTail = true; | private $isTail = true; | ||||
| private $height; | |||||
| public function setIsHead($is_head) { | public function setIsHead($is_head) { | ||||
| $this->isHead = $is_head; | $this->isHead = $is_head; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsHead() { | public function getIsHead() { | ||||
| return $this->isHead; | return $this->isHead; | ||||
| } | } | ||||
| public function setIsTail($is_tail) { | public function setIsTail($is_tail) { | ||||
| $this->isTail = $is_tail; | $this->isTail = $is_tail; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsTail() { | public function getIsTail() { | ||||
| return $this->isTail; | return $this->isTail; | ||||
| } | } | ||||
| public function setHeight($height) { | |||||
| $this->height = $height; | |||||
| return $this; | |||||
| } | |||||
| public function getHeight() { | |||||
| return $this->height; | |||||
| } | |||||
| public function renderRawGraph(array $parents) { | public function renderRawGraph(array $parents) { | ||||
| // This keeps our accumulated information about each line of the | // This keeps our accumulated information about each line of the | ||||
| // merge/branch graph. | // merge/branch graph. | ||||
| $graph = array(); | $graph = array(); | ||||
| // This holds the next commit we're looking for in each column of the | // This holds the next commit we're looking for in each column of the | ||||
| // graph. | // graph. | ||||
| $threads = array(); | $threads = array(); | ||||
| ▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | foreach ($graph as $k => $meta) { | ||||
| ), | ), | ||||
| ''); | ''); | ||||
| } | } | ||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'diffusion-commit-graph', | 'diffusion-commit-graph', | ||||
| array( | array( | ||||
| 'count' => $count, | 'count' => $count, | ||||
| 'autoheight' => true, | 'height' => $this->getHeight(), | ||||
| )); | )); | ||||
| return $graph; | return $graph; | ||||
| } | } | ||||
| } | } | ||||