@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+31 -25
+31 -25
src/view/layout/PhabricatorObjectItemListView.php
··· 1 1 <?php 2 2 3 - final class PhabricatorObjectItemListView extends AphrontView { 3 + final class PhabricatorObjectItemListView extends AphrontTagView { 4 4 5 5 private $header; 6 6 private $items; ··· 45 45 return $this; 46 46 } 47 47 48 - public function render() { 49 - require_celerity_resource('phabricator-object-item-list-view-css'); 48 + protected function getTagName() { 49 + return 'ul'; 50 + } 50 51 52 + protected function getTagAttributes() { 51 53 $classes = array(); 54 + 55 + $classes[] = 'phabricator-object-item-list-view'; 56 + if ($this->stackable) { 57 + $classes[] = 'phabricator-object-list-stackable'; 58 + } 59 + if ($this->cards) { 60 + $classes[] = 'phabricator-object-list-cards'; 61 + } 62 + if ($this->flush) { 63 + $classes[] = 'phabricator-object-list-flush'; 64 + } 65 + 66 + return array( 67 + 'class' => $classes, 68 + ); 69 + } 70 + 71 + protected function getTagContent() { 72 + require_celerity_resource('phabricator-object-item-list-view-css'); 73 + 52 74 $header = null; 53 75 if (strlen($this->header)) { 54 76 $header = phutil_tag( ··· 73 95 $pager = $this->pager; 74 96 } 75 97 76 - $classes[] = 'phabricator-object-item-list-view'; 77 - if ($this->stackable) { 78 - $classes[] = 'phabricator-object-list-stackable'; 79 - } 80 - if ($this->cards) { 81 - $classes[] = 'phabricator-object-list-cards'; 82 - } 83 - if ($this->flush) { 84 - $classes[] = 'phabricator-object-list-flush'; 85 - } 86 - 87 - return phutil_tag( 88 - 'ul', 89 - array( 90 - 'class' => implode(' ', $classes), 91 - ), 92 - array( 93 - $header, 94 - $items, 95 - $pager, 96 - $this->renderChildren(), 97 - )); 98 + return array( 99 + $header, 100 + $items, 101 + $pager, 102 + $this->renderChildren(), 103 + ); 98 104 } 99 105 100 106 }