AdminMenuPageService.php
1 year ago
AdminMenuPageServiceProvider.php
2 years ago
ProductCollectionsMenuService.php
2 years ago
AdminMenuPageServiceProvider.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\WordPress\Admin\Menus; |
| 4 | |
| 5 | use SureCartCore\ServiceProviders\ServiceProviderInterface; |
| 6 | |
| 7 | /** |
| 8 | * Register plugin options. |
| 9 | */ |
| 10 | class AdminMenuPageServiceProvider implements ServiceProviderInterface { |
| 11 | /** |
| 12 | * Register all dependencies in the IoC container. |
| 13 | * |
| 14 | * @param \Pimple\Container $container Service container. |
| 15 | * @return void |
| 16 | */ |
| 17 | public function register( $container ) { |
| 18 | $container['surecart.admin.menus'] = function () { |
| 19 | return new AdminMenuPageService(); |
| 20 | }; |
| 21 | $container['surecart.product_collection_pages.menus'] = function () { |
| 22 | return new ProductCollectionsMenuService(); |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Bootstrap any services if needed. |
| 28 | * |
| 29 | * @param \Pimple\Container $container Service container. |
| 30 | * @return void |
| 31 | */ |
| 32 | public function bootstrap( $container ) { |
| 33 | $container['surecart.admin.menus']->bootstrap(); |
| 34 | $container['surecart.product_collection_pages.menus']->bootstrap(); |
| 35 | } |
| 36 | } |
| 37 |