| Total Complexity | 12 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ActionButton extends View |
||
| 10 | { |
||
| 11 | public $defaultTemplate = 'action_button.html'; |
||
| 12 | |||
| 13 | public $ui = 'basic inverted action button'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Icon that will appear on the button (top). |
||
| 17 | * |
||
| 18 | * @var string|array|Icon |
||
| 19 | */ |
||
| 20 | public $icon; |
||
| 21 | |||
| 22 | public $label; |
||
| 23 | |||
| 24 | public $element = 'a'; |
||
| 25 | |||
| 26 | public $weight = 10; |
||
| 27 | |||
| 28 | public $callback; |
||
| 29 | |||
| 30 | public function renderView() |
||
| 31 | { |
||
| 32 | $this->addIcon(); |
||
| 33 | |||
| 34 | $this->addLabel(); |
||
| 35 | |||
| 36 | $this->addCallback(); |
||
| 37 | |||
| 38 | parent::renderView(); |
||
| 39 | } |
||
| 40 | |||
| 41 | protected function addIcon() |
||
| 50 | } |
||
| 51 | |||
| 52 | protected function addLabel() |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getIcon() |
||
| 62 | } |
||
| 63 | |||
| 64 | public function callback($callable) |
||
| 69 | } |
||
| 70 | |||
| 71 | public function addCallback() |
||
| 84 | } |
||
| 85 | |||
| 87 |