traits
2 years ago
base-vui-banner-box.php
2 years ago
base-vui-box.php
2 years ago
base-vui-panel-box.php
2 years ago
boxes-repository.php
2 years ago
base-vui-panel-box.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace JFB_Components\Admin\Vui_Boxes; |
| 5 | |
| 6 | // If this file is called directly, abort. |
| 7 | if ( ! defined( 'WPINC' ) ) { |
| 8 | die; |
| 9 | } |
| 10 | |
| 11 | abstract class Base_Vui_Panel_Box extends Base_Vui_Box { |
| 12 | |
| 13 | abstract public function get_title(): string; |
| 14 | |
| 15 | abstract public function get_description(): string; |
| 16 | |
| 17 | public function get_type(): string { |
| 18 | return self::TYPE_PANEL; |
| 19 | } |
| 20 | |
| 21 | public function to_array(): array { |
| 22 | return array_merge( |
| 23 | parent::to_array(), |
| 24 | array( |
| 25 | 'title' => $this->get_title(), |
| 26 | 'description' => $this->get_description(), |
| 27 | ) |
| 28 | ); |
| 29 | } |
| 30 | |
| 31 | } |
| 32 |