From 06338db5bb1ee3c2764ca7847907650fb3358fd6 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 2 Jun 2013 09:39:44 -0700 Subject: [PATCH] Make PhabricatorObjectItemListView extend AphrontTagView Summary: Provide all the setSigil() / setID() sorts of calls. No functional changes. Test Plan: Viewed object item lists. Reviewers: chad, btrahan Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6112 --- .../layout/PhabricatorObjectItemListView.php | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/src/view/layout/PhabricatorObjectItemListView.php b/src/view/layout/PhabricatorObjectItemListView.php index 33f61bcbb6..300c6909a7 100644 --- a/src/view/layout/PhabricatorObjectItemListView.php +++ b/src/view/layout/PhabricatorObjectItemListView.php @@ -1,6 +1,6 @@ stackable) { + $classes[] = 'phabricator-object-list-stackable'; + } + if ($this->cards) { + $classes[] = 'phabricator-object-list-cards'; + } + if ($this->flush) { + $classes[] = 'phabricator-object-list-flush'; + } + + return array( + 'class' => $classes, + ); + } + + protected function getTagContent() { require_celerity_resource('phabricator-object-item-list-view-css'); - $classes = array(); $header = null; if (strlen($this->header)) { $header = phutil_tag( @@ -73,28 +95,12 @@ final class PhabricatorObjectItemListView extends AphrontView { $pager = $this->pager; } - $classes[] = 'phabricator-object-item-list-view'; - if ($this->stackable) { - $classes[] = 'phabricator-object-list-stackable'; - } - if ($this->cards) { - $classes[] = 'phabricator-object-list-cards'; - } - if ($this->flush) { - $classes[] = 'phabricator-object-list-flush'; - } - - return phutil_tag( - 'ul', - array( - 'class' => implode(' ', $classes), - ), - array( - $header, - $items, - $pager, - $this->renderChildren(), - )); + return array( + $header, + $items, + $pager, + $this->renderChildren(), + ); } }