Differential D9286 Diff 22325 src/applications/differential/view/DifferentialChangesetDetailView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialChangesetDetailView.php
<?php | <?php | ||||
final class DifferentialChangesetDetailView extends AphrontView { | final class DifferentialChangesetDetailView extends AphrontView { | ||||
private $changeset; | private $changeset; | ||||
private $buttons = array(); | private $buttons = array(); | ||||
private $editable; | private $editable; | ||||
private $symbolIndex; | private $symbolIndex; | ||||
private $id; | private $id; | ||||
private $vsChangesetID; | private $vsChangesetID; | ||||
private $renderURI; | |||||
private $whitespace; | |||||
private $renderingRef; | |||||
private $autoload; | |||||
public function setAutoload($autoload) { | |||||
$this->autoload = $autoload; | |||||
return $this; | |||||
} | |||||
public function getAutoload() { | |||||
return $this->autoload; | |||||
} | |||||
public function setRenderingRef($rendering_ref) { | |||||
$this->renderingRef = $rendering_ref; | |||||
return $this; | |||||
} | |||||
public function getRenderingRef() { | |||||
return $this->renderingRef; | |||||
} | |||||
public function setWhitespace($whitespace) { | |||||
$this->whitespace = $whitespace; | |||||
return $this; | |||||
} | |||||
public function getWhitespace() { | |||||
return $this->whitespace; | |||||
} | |||||
public function setRenderURI($render_uri) { | |||||
$this->renderURI = $render_uri; | |||||
return $this; | |||||
} | |||||
public function getRenderURI() { | |||||
return $this->renderURI; | |||||
} | |||||
public function setChangeset($changeset) { | public function setChangeset($changeset) { | ||||
$this->changeset = $changeset; | $this->changeset = $changeset; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function addButton($button) { | public function addButton($button) { | ||||
$this->buttons[] = $button; | $this->buttons[] = $button; | ||||
Show All 12 Lines | final class DifferentialChangesetDetailView extends AphrontView { | ||||
public function getID() { | public function getID() { | ||||
if (!$this->id) { | if (!$this->id) { | ||||
$this->id = celerity_generate_unique_node_id(); | $this->id = celerity_generate_unique_node_id(); | ||||
} | } | ||||
return $this->id; | return $this->id; | ||||
} | } | ||||
public function setID($id) { | |||||
$this->id = $id; | |||||
return $this; | |||||
} | |||||
public function setVsChangesetID($vs_changeset_id) { | public function setVsChangesetID($vs_changeset_id) { | ||||
$this->vsChangesetID = $vs_changeset_id; | $this->vsChangesetID = $vs_changeset_id; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getVsChangesetID() { | public function getVsChangesetID() { | ||||
return $this->vsChangesetID; | return $this->vsChangesetID; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | return javelin_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'sigil' => 'differential-changeset', | 'sigil' => 'differential-changeset', | ||||
'meta' => array( | 'meta' => array( | ||||
'left' => nonempty( | 'left' => nonempty( | ||||
$this->getVsChangesetID(), | $this->getVsChangesetID(), | ||||
$this->changeset->getID()), | $this->changeset->getID()), | ||||
'right' => $this->changeset->getID(), | 'right' => $this->changeset->getID(), | ||||
'renderURI' => $this->getRenderURI(), | |||||
'whitespace' => $this->getWhitespace(), | |||||
'highlight' => null, | |||||
'renderer' => null, | |||||
'ref' => $this->getRenderingRef(), | |||||
'autoload' => $this->getAutoload(), | |||||
), | ), | ||||
'class' => $class, | 'class' => $class, | ||||
'id' => $id, | 'id' => $id, | ||||
), | ), | ||||
array( | array( | ||||
id(new PhabricatorAnchorView()) | id(new PhabricatorAnchorView()) | ||||
->setAnchorName($changeset->getAnchorName()) | ->setAnchorName($changeset->getAnchorName()) | ||||
->setNavigationMarker(true) | ->setNavigationMarker(true) | ||||
->render(), | ->render(), | ||||
$buttons, | $buttons, | ||||
phutil_tag('h1', | phutil_tag('h1', | ||||
array( | array( | ||||
'class' => 'differential-file-icon-header'), | 'class' => 'differential-file-icon-header'), | ||||
array( | array( | ||||
$icon, | $icon, | ||||
$display_filename)), | $display_filename, | ||||
phutil_tag('div', array('style' => 'clear: both'), ''), | )), | ||||
$this->renderChildren(), | javelin_tag( | ||||
'div', | |||||
array( | |||||
'class' => 'changeset-view-content', | |||||
'sigil' => 'changeset-view-content', | |||||
), | |||||
$this->renderChildren()), | |||||
)); | )); | ||||
} | } | ||||
} | } |