Help.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Admin\PageFactory; |
| 6 | |
| 7 | use AC\Admin\MenuFactoryInterface; |
| 8 | use AC\Admin\Page; |
| 9 | use AC\Admin\PageFactoryInterface; |
| 10 | use AC\Admin\View; |
| 11 | use AC\AdminColumns; |
| 12 | use AC\Deprecated\HookCollectionFactory; |
| 13 | use AC\Deprecated\Hooks; |
| 14 | |
| 15 | class Help implements PageFactoryInterface |
| 16 | { |
| 17 | protected AdminColumns $plugin; |
| 18 | |
| 19 | protected MenuFactoryInterface $menu_factory; |
| 20 | |
| 21 | protected View\MenuFactory $view_menu_factory; |
| 22 | |
| 23 | public function __construct( |
| 24 | AdminColumns $plugin, |
| 25 | MenuFactoryInterface $menu_factory, |
| 26 | View\MenuFactory $view_menu_factory |
| 27 | ) { |
| 28 | $this->plugin = $plugin; |
| 29 | $this->menu_factory = $menu_factory; |
| 30 | $this->view_menu_factory = $view_menu_factory; |
| 31 | } |
| 32 | |
| 33 | public function create(): Page\Help |
| 34 | { |
| 35 | return new Page\Help( |
| 36 | new Hooks(new HookCollectionFactory()), |
| 37 | $this->view_menu_factory->create($this->menu_factory, 'help') |
| 38 | ); |
| 39 | } |
| 40 | |
| 41 | } |
| 42 |