1 | <?php |
||
11 | trait HasModulesRoutesTrait |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @param RouteCollection $collection |
||
16 | * @param $module |
||
17 | * @param $prefix |
||
18 | */ |
||
19 | 3 | public static function generateGenericModuleDefaultRoutes($collection, $module, $prefix) |
|
20 | { |
||
21 | 3 | $moduleName = is_array($module) ? $module[0] : $module; |
|
22 | 3 | $params = ['module' => $module]; |
|
23 | |||
24 | 3 | self::generateIndexRoute( |
|
25 | 3 | $collection, |
|
26 | $moduleName, |
||
27 | 3 | self::generateModuleRouteClassBase($module, 'Literal'), |
|
28 | $prefix, |
||
29 | $params |
||
30 | ); |
||
31 | |||
32 | 3 | self::generateStandardRoute( |
|
33 | 3 | $collection, |
|
34 | 3 | $moduleName . ".default", |
|
35 | 3 | self::generateModuleRouteClassBase($module, 'Standard'), |
|
36 | $prefix, |
||
37 | 3 | null, |
|
38 | $params |
||
39 | ); |
||
40 | 3 | } |
|
41 | |||
42 | /** |
||
43 | * @param string|array $module |
||
44 | * @param string $type |
||
45 | * @return string |
||
46 | */ |
||
47 | 3 | public static function generateModuleRouteClassBase($module, $type) |
|
57 | |||
58 | /** |
||
59 | * @param RouteCollection $collection |
||
60 | * @param $class |
||
61 | */ |
||
62 | public static function generateModuleDefaultErrorRoutes($collection, $class) |
||
66 | |||
67 | /** |
||
68 | * @param RouteCollection $collection |
||
69 | * @param $class |
||
70 | * @param string $module |
||
71 | */ |
||
72 | public static function generateModuleErrorRoutes($collection, $class, $module = 'default') |
||
79 | } |
||
80 |