1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 07:42:40 +01:00
phorge-phorge/src/view/layout/PhabricatorAnchorView.php
epriestley 4c914a5c49 Remove all calls to renderSingleView() and deprecate it
Summary: After D5305, this method does nothing since we automatically figure out what we need to do.

Test Plan:
- Viewed a page with the main menu on it (MainMenuView).
- Viewed a revision with transactions on it (TransactionView).
- Viewed timeline UIExample (TimelineView, TimelineEventView).
- Viewed a revision (PropertyListView).
- Viewed a profile (ProfileHeaderView).
- Viewed Pholio list (PinboardView, PinboardItemView).
- Viewed Config (ObjectItemView, ObjectItemListView).
- Viewed Home (MenuView).
- Viewed a revision (HeaderView, CrumbsView, ActionListView).
- Viewed a revision with an inline comment (anchorview).
- Viewed a Phriction diff page (AphrontCrumbsView).
  - Filed T2721 to get rid of this.
- Looked at Pholio and made inlines and comments (mockimages, pholioinlinecomment/save/edit).
- Looked at conpherences.
- Browsed around.

Reviewers: chad, vrana

Reviewed By: chad

CC: edward, aran

Differential Revision: https://secure.phabricator.com/D5307
2013-03-09 13:52:41 -08:00

45 lines
912 B
PHP

<?php
final class PhabricatorAnchorView extends AphrontView {
private $anchorName;
private $navigationMarker;
public function setAnchorName($name) {
$this->anchorName = $name;
return $this;
}
public function setNavigationMarker($marker) {
$this->navigationMarker = $marker;
return $this;
}
public function render() {
$marker = null;
if ($this->navigationMarker) {
$marker = javelin_tag(
'legend',
array(
'class' => 'phabricator-anchor-navigation-marker',
'sigil' => 'marker',
'meta' => array(
'anchor' => $this->anchorName,
),
),
'');
}
$anchor = phutil_tag(
'a',
array(
'name' => $this->anchorName,
'id' => $this->anchorName,
'class' => 'phabricator-anchor-view',
),
'');
return array($marker, $anchor);
}
}