Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUIButtonBarView.php
| <?php | <?php | ||||
| final class PHUIButtonBarView extends AphrontTagView { | final class PHUIButtonBarView extends AphrontTagView { | ||||
| private $buttons = array(); | private $buttons = array(); | ||||
| public function addButton($button) { | public function addButton($button) { | ||||
| $this->buttons[] = $button; | $this->buttons[] = $button; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| protected function getTagAttributes() { | protected function getTagAttributes() { | ||||
| return array('class' => 'phui-button-bar'); | return array('class' => 'phui-button-bar'); | ||||
| } | } | ||||
| protected function getTagName() { | protected function getTagName() { | ||||
| return 'div'; | return 'span'; | ||||
| } | } | ||||
| protected function getTagContent() { | protected function getTagContent() { | ||||
| require_celerity_resource('phui-button-css'); | require_celerity_resource('phui-button-css'); | ||||
| $i = 1; | $i = 1; | ||||
| $j = count($this->buttons); | $j = count($this->buttons); | ||||
| foreach ($this->buttons as $button) { | foreach ($this->buttons as $button) { | ||||
| Show All 17 Lines | |||||