Changeset View
Changeset View
Standalone View
Standalone View
src/applications/uiexample/examples/PHUIXComponentsExample.php
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | $buttons = array( | ||||
| 'type' => PHUIButtonView::BUTTONTYPE_SIMPLE, | 'type' => PHUIButtonView::BUTTONTYPE_SIMPLE, | ||||
| 'text' => pht('3 / 5 Comments'), | 'text' => pht('3 / 5 Comments'), | ||||
| 'icon' => 'fa-comment', | 'icon' => 'fa-comment', | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'color' => PHUIButtonView::GREEN, | 'color' => PHUIButtonView::GREEN, | ||||
| 'text' => pht('Environmental!'), | 'text' => pht('Environmental!'), | ||||
| ), | ), | ||||
| array( | |||||
| 'icon' => 'fa-cog', | |||||
| ), | |||||
| array( | |||||
| 'icon' => 'fa-cog', | |||||
| 'type' => PHUIButtonView::BUTTONTYPE_SIMPLE, | |||||
| ), | |||||
| array( | |||||
| 'text' => array('2 + 2', ' ', '=', ' ', '4'), | |||||
| ), | |||||
| array( | |||||
| 'color' => PHUIButtonView::GREY, | |||||
| 'text' => pht('Cancel'), | |||||
| ), | |||||
| array( | |||||
| 'text' => array('<strong />'), | |||||
| ), | |||||
| ); | ); | ||||
| foreach ($buttons as $spec) { | foreach ($buttons as $spec) { | ||||
| $button = new PHUIButtonView(); | $button = new PHUIButtonView(); | ||||
| if (idx($spec, 'text') !== null) { | if (idx($spec, 'text') !== null) { | ||||
| $button->setText($spec['text']); | $button->setText($spec['text']); | ||||
| } | } | ||||
| Show All 40 Lines | |||||