Skip to content

Commit 029fa5b

Browse files
author
epriestley
committed
Allow AphrontTagView subclasses to wrap their tag in a container
Summary: See Conpherence discussion. This probably works? Test Plan: Didn't test at all! bwahaha Reviewers: chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6120
1 parent 71118f8 commit 029fa5b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/view/AphrontTagView.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ abstract class AphrontTagView extends AphrontView {
1414
private $mustCapture;
1515
private $workflow;
1616

17-
1817
public function setWorkflow($workflow) {
1918
$this->workflow = $workflow;
2019
return $this;
@@ -90,6 +89,10 @@ protected function getTagContent() {
9089
return $this->renderChildren();
9190
}
9291

92+
protected function renderTagContainer($tag) {
93+
return $tag;
94+
}
95+
9396
protected function willRender() {
9497
return;
9598
}
@@ -151,9 +154,11 @@ final public function render() {
151154
}
152155
}
153156

154-
return javelin_tag(
157+
$tag = javelin_tag(
155158
$this->getTagName(),
156159
$attributes,
157160
$this->getTagContent());
161+
162+
return $this->renderTagContainer($tag);
158163
}
159164
}

0 commit comments

Comments
 (0)