Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $frontendModule[] = new Route('[<locale=cs cs|en|sk>/]'. $this->getUrl('dokumenty.default'). '[/kategorie/<category>]', [
- 'presenter' => 'Document',
- 'action' => 'default',
- 'category' => [
- Route::FILTER_IN => function ($slug) {
- $model = $this->container->createService('CategoryStorage');
- return $model->getIdBySlug($slug, $this->locale);
- },
- Route::FILTER_OUT => function ($id) {
- $model = $this->container->createService('CategoryStorage');
- return $model->getUrlById($id, $this->locale);
- }
- ]
- ]);
- $frontendModule[] = new Route('[<locale=cs cs|en|sk>/]'. $this->getUrl('blog.new') .'/[category/<category>]', [
- 'presenter' => 'Blog',
- 'action' => 'default',
- 'category' => [
- Route::FILTER_IN => function ($slug) {
- $model = $this->container->createService('BlogCategoryStorage');
- return $model->getCategoryIdBySlug($slug, $this->locale);
- },
- Route::FILTER_OUT => function ($id) {
- $model = $this->container->createService('BlogCategoryStorage');
- return $model->getSlugById($id, $this->locale);
- }
- ]
- ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement