From 029fa5b1f31bdc11add8afa5ca25d982495dc2c8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 3 Jun 2013 13:24:12 -0700 Subject: [PATCH] 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 --- src/view/AphrontTagView.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/view/AphrontTagView.php b/src/view/AphrontTagView.php index 1afcd3ff91..a65ebc641e 100644 --- a/src/view/AphrontTagView.php +++ b/src/view/AphrontTagView.php @@ -14,7 +14,6 @@ abstract class AphrontTagView extends AphrontView { private $mustCapture; private $workflow; - public function setWorkflow($workflow) { $this->workflow = $workflow; return $this; @@ -90,6 +89,10 @@ abstract class AphrontTagView extends AphrontView { return $this->renderChildren(); } + protected function renderTagContainer($tag) { + return $tag; + } + protected function willRender() { return; } @@ -151,9 +154,11 @@ abstract class AphrontTagView extends AphrontView { } } - return javelin_tag( + $tag = javelin_tag( $this->getTagName(), $attributes, $this->getTagContent()); + + return $this->renderTagContainer($tag); } }