base-vui-banner-box.php
3 years ago
base-vui-box.php
3 years ago
base-vui-panel-box.php
3 years ago
boxes-repository.php
3 years ago
with-boxes-trait.php
3 years ago
base-vui-banner-box.php
39 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Admin\Vui_Boxes; |
| 5 | |
| 6 | use Jet_Form_Builder\Classes\Arrayable\Array_Tools; |
| 7 | |
| 8 | abstract class Base_Vui_Banner_Box extends Base_Vui_Box { |
| 9 | |
| 10 | abstract public function get_label(): string; |
| 11 | |
| 12 | abstract public function get_title(): string; |
| 13 | |
| 14 | public function get_content(): string { |
| 15 | return ''; |
| 16 | } |
| 17 | |
| 18 | public function get_buttons(): array { |
| 19 | return array(); |
| 20 | } |
| 21 | |
| 22 | public function get_type(): string { |
| 23 | return self::TYPE_BANNER; |
| 24 | } |
| 25 | |
| 26 | public function to_array(): array { |
| 27 | return array_merge( |
| 28 | parent::to_array(), |
| 29 | array( |
| 30 | 'title' => $this->get_title(), |
| 31 | 'label' => $this->get_label(), |
| 32 | 'content' => $this->get_content(), |
| 33 | 'buttons' => Array_Tools::to_array( $this->get_buttons() ), |
| 34 | ) |
| 35 | ); |
| 36 | } |
| 37 | |
| 38 | } |
| 39 |