| 1 | <?php namespace EmailLog\Core\UI; |
||
| 9 | class UILoader { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Plugin filename. |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $plugin_file; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * UI Component List. |
||
| 20 | * |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $components = array(); |
||
| 24 | |||
| 25 | /** |
||
| 26 | * List of Admin pages. |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | protected $pages = array(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Setup UI Loader. |
||
| 33 | * |
||
| 34 | * @param string $file Plugin main file. |
||
| 35 | */ |
||
| 36 | public function __construct( $file ) { |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Load all components and setup hooks. |
||
| 42 | */ |
||
| 43 | public function load() { |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Initialize UI component Objects. |
||
| 58 | * |
||
| 59 | * This method may be overwritten in tests. |
||
| 60 | * |
||
| 61 | * @access protected |
||
| 62 | */ |
||
| 63 | protected function initialize_components() { |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Initialize Admin page Objects. |
||
| 69 | * |
||
| 70 | * This method may be overwritten in tests. |
||
| 71 | * |
||
| 72 | * @access protected |
||
| 73 | */ |
||
| 74 | protected function initialize_pages() { |
||
| 79 | } |
||
| 80 |