| Conditions | 1 |
| Paths | 1 |
| Total Lines | 32 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function init($router) |
||
| 18 | { |
||
| 19 | $types_keys = array_keys(Type::types()); |
||
| 20 | $types_regex = '(' . implode('|', $types_keys) . ')'; |
||
| 21 | |||
| 22 | $router->add('/publication/admin/{type:' . $types_regex . '}', array( |
||
| 23 | 'module' => 'publication', |
||
| 24 | 'controller' => 'admin', |
||
| 25 | 'action' => 'index' |
||
| 26 | ))->setName('publications_admin'); |
||
| 27 | |||
| 28 | $router->add('/publication/admin/{type:' . $types_regex . '}/([a-zA-Z0-9_]+)', array( |
||
| 29 | 'module' => 'publication', |
||
| 30 | 'controller' => 'admin', |
||
| 31 | 'action' => 2 |
||
| 32 | ))->setName('publications_admin_action'); |
||
| 33 | |||
| 34 | $router->addML('/{type:' . $types_regex . '}', array( |
||
| 35 | 'module' => 'publication', |
||
| 36 | 'controller' => 'index', |
||
| 37 | 'action' => 'index' |
||
| 38 | ), 'publications'); |
||
| 39 | |||
| 40 | $router->addML('/{type:' . $types_regex . '}/{slug:[a-zA-Z0-9_-]+}.html', array( |
||
| 41 | 'module' => 'publication', |
||
| 42 | 'controller' => 'index', |
||
| 43 | 'action' => 'publication' |
||
| 44 | ), 'publication'); |
||
| 45 | |||
| 46 | return $router; |
||
| 47 | |||
| 48 | } |
||
| 49 | |||
| 50 | } |