Restore highlighting when jumping to transactions using URI anchors
[phabricator/blender.git] / src / view / layout / PhabricatorAnchorView.php
blobec2a3b0dc8fc1bffa98257d0c9a5571a7192c5b9
1 <?php
3 final class PhabricatorAnchorView extends AphrontView {
5 private $anchorName;
6 private $navigationMarker;
8 public function setAnchorName($name) {
9 $this->anchorName = $name;
10 return $this;
13 public function setNavigationMarker($marker) {
14 $this->navigationMarker = $marker;
15 return $this;
18 public function render() {
19 $marker = null;
20 if ($this->navigationMarker) {
21 $marker = javelin_tag(
22 'legend',
23 array(
24 'class' => 'phabricator-anchor-navigation-marker',
25 'sigil' => 'marker',
26 'meta' => array(
27 'anchor' => $this->anchorName,
30 '');
33 $anchor = phutil_tag(
34 'a',
35 array(
36 'name' => $this->anchorName,
37 'id' => $this->anchorName,
38 'class' => 'phabricator-anchor-view',
40 '');
42 return array($marker, $anchor);