AdminRouteService.php
2 years ago
AdminRouteServiceProvider.php
3 years ago
AdminURLService.php
3 years ago
PermalinkService.php
3 years ago
PermalinkServiceProvider.php
2 years ago
PermalinkSettingService.php
2 years ago
PermalinksSettingsService.php
2 years ago
RouteConditionsServiceProvider.php
3 years ago
AdminRouteService.php
63 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SureCart\Routing; |
| 4 | |
| 5 | use SureCart\Routing\AdminURLService; |
| 6 | |
| 7 | /** |
| 8 | * Provide custom route conditions. |
| 9 | * This is an example class so feel free to modify or remove it. |
| 10 | */ |
| 11 | class AdminRouteService { |
| 12 | /** |
| 13 | * Page name map. |
| 14 | * |
| 15 | * @var array |
| 16 | */ |
| 17 | protected $page_names = [ |
| 18 | 'product' => 'sc-products', |
| 19 | 'products' => 'sc-products', |
| 20 | 'order' => 'sc-orders', |
| 21 | 'orders' => 'sc-orders', |
| 22 | 'checkout' => 'sc-checkouts', |
| 23 | 'bump' => 'sc-bumps', |
| 24 | 'bumps' => 'sc-bumps', |
| 25 | 'invoice' => 'sc-invoices', |
| 26 | 'invoices' => 'sc-invoices', |
| 27 | 'customers' => 'sc-customers', |
| 28 | 'customer' => 'sc-customers', |
| 29 | 'subscriptions' => 'sc-subscriptions', |
| 30 | 'subscription' => 'sc-subscriptions', |
| 31 | 'licenses' => 'sc-licenses', |
| 32 | 'license' => 'sc-licenses', |
| 33 | 'abandoned-checkout' => 'sc-abandoned-checkouts', |
| 34 | 'abandoned-checkouts' => 'sc-abandoned-checkouts', |
| 35 | 'upgrade-paths' => 'sc-product-groups', |
| 36 | 'coupon' => 'sc-coupons', |
| 37 | 'coupons' => 'sc-coupons', |
| 38 | 'product_group' => 'sc-product-groups', |
| 39 | 'product_groups' => 'sc-product-groups', |
| 40 | 'cancellations' => 'sc-cancellation-insights', |
| 41 | 'product_collection' => 'sc-product-collections', |
| 42 | 'product_collections' => 'sc-product-collections', |
| 43 | ]; |
| 44 | |
| 45 | /** |
| 46 | * Get the page names. |
| 47 | * |
| 48 | * @return void |
| 49 | */ |
| 50 | public function getPageNames() { |
| 51 | return $this->page_names; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Get URL function |
| 56 | * |
| 57 | * @return AdminURLService |
| 58 | */ |
| 59 | public function getUrl() { |
| 60 | return new AdminURLService( $this->page_names ); |
| 61 | } |
| 62 | } |
| 63 |