AdminRouteService.php
2 years ago
AdminRouteServiceProvider.php
3 years ago
AdminURLService.php
1 year ago
PermalinkService.php
3 years ago
PermalinkServiceProvider.php
1 year ago
PermalinkSettingService.php
2 years ago
PermalinksSettingsService.php
2 years ago
RouteConditionsServiceProvider.php
3 years ago
AdminRouteService.php
78 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 | 'upsell' => 'sc-upsell-funnels', |
| 26 | 'upsells' => 'sc-upsell-funnels', |
| 27 | 'invoice' => 'sc-invoices', |
| 28 | 'invoices' => 'sc-invoices', |
| 29 | 'customers' => 'sc-customers', |
| 30 | 'customer' => 'sc-customers', |
| 31 | 'subscriptions' => 'sc-subscriptions', |
| 32 | 'subscription' => 'sc-subscriptions', |
| 33 | 'licenses' => 'sc-licenses', |
| 34 | 'license' => 'sc-licenses', |
| 35 | 'abandoned-checkout' => 'sc-abandoned-checkouts', |
| 36 | 'abandoned-checkouts' => 'sc-abandoned-checkouts', |
| 37 | 'upgrade-paths' => 'sc-product-groups', |
| 38 | 'coupon' => 'sc-coupons', |
| 39 | 'coupons' => 'sc-coupons', |
| 40 | 'product_group' => 'sc-product-groups', |
| 41 | 'product_groups' => 'sc-product-groups', |
| 42 | 'cancellations' => 'sc-cancellation-insights', |
| 43 | 'product_collection' => 'sc-product-collections', |
| 44 | 'product_collections' => 'sc-product-collections', |
| 45 | 'restore' => 'sc-restore', |
| 46 | 'affiliates' => 'sc-affiliates', |
| 47 | 'affiliate' => 'sc-affiliate', |
| 48 | 'affiliate-click' => 'sc-affiliate-clicks', |
| 49 | 'affiliate-clicks' => 'sc-affiliate-clicks', |
| 50 | 'affiliate-referral' => 'sc-affiliate-referrals', |
| 51 | 'affiliate-referrals' => 'sc-affiliate-referrals', |
| 52 | 'affiliate-requests' => 'sc-affiliate-requests', |
| 53 | 'affiliate-request' => 'sc-affiliate-requests', |
| 54 | 'affiliate-payouts' => 'sc-affiliate-payouts', |
| 55 | 'affiliate-payout' => 'sc-affiliate-payouts', |
| 56 | 'affiliate-payout-groups' => 'sc-affiliate-payout-groups', |
| 57 | 'affiliate-payout-group' => 'sc-affiliate-payout-groups', |
| 58 | ]; |
| 59 | |
| 60 | /** |
| 61 | * Get the page names. |
| 62 | * |
| 63 | * @return void |
| 64 | */ |
| 65 | public function getPageNames() { |
| 66 | return $this->page_names; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Get URL function |
| 71 | * |
| 72 | * @return AdminURLService |
| 73 | */ |
| 74 | public function getUrl() { |
| 75 | return new AdminURLService( $this->page_names ); |
| 76 | } |
| 77 | } |
| 78 |