Skip to content

Commit

Permalink
Merge pull request #18 from gregorybesson/develop
Browse files Browse the repository at this point in the history
refactoring Gallery
  • Loading branch information
gregorybesson committed Sep 23, 2014
2 parents ad21073 + 56cf742 commit 4afb16c
Show file tree
Hide file tree
Showing 25 changed files with 2,391 additions and 430 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"zendframework/zend-developer-tools" : "dev-master",
"jhuet/zdt-logger-module" : "0.*",
"bjyoungblood/bjy-authorize" : "1.1.*",
"playground/core" : "dev-master"
"playground/core" : "2.*"
},
"require-dev" : {
"phpunit/phpunit" : "3.7.*"
Expand Down
127 changes: 127 additions & 0 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@
),
'may_terminate' => true,
'child_routes' => array(
'galleryPager' => array(
'type' => 'Segment',
'options' => array(
'route' => '/gallery[/filters/:filters][/p/:p]',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Admin\GalleryAdmin',
'action' => 'index',
),
),
),

'create' => array(
'type' => 'Segment',
'options' => array(
Expand Down Expand Up @@ -132,6 +143,93 @@
),
),
),
'tag' => array(
'type' => 'Segment',
'options' => array(
'route' => '/tag'
),
'may_terminate' => true,
'child_routes' => array(
'create' => array(
'type' => 'Segment',
'options' => array(
'route' => '/create',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Admin\GalleryAdmin',
'action' => 'createTag',
),
),
),
'edit' => array(
'type' => 'Segment',
'options' => array(
'route' => '/edit[/:tagId]',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Admin\GalleryAdmin',
'action' => 'editTag',
),
'constraints' => array(
'tagId' => '[0-9]*',
),
),
),
'remove' => array(
'type' => 'Segment',
'options' => array(
'route' => '/remove[/:tagId]',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Admin\GalleryAdmin',
'action' => 'removeTag',
),
'constraints' => array(
'tagId' => '[0-9]*',
),
),
),
),
),
),
),
),
),
'frontend' => array(
'api' => array(
'type' => 'segment',
'options' => array(
'route' => '/api',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Api\Api',
'action' => 'index',
),
),
'child_routes' => array(
'list' => array(
'type' => 'Segment',
'options' => array(
'route' => '/list',
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Api\Api',
'action' => 'index',
),
),

),
'gallery' => array(
'type' => 'Segment',
'options' => array(
'route' => '/gallery[/offset/:offset][/limit/:limit][/tag/:tag][/type/:type]',
'constraints' => array(
'offset' => '[0-9]*',
'tag' => '[0-9]*',
'type' => '[a-z]*',
'limit' => '[0-9]*',
'country' => '[a-z]*',
),
'defaults' => array(
'controller' => 'PlaygroundGallery\Controller\Api\Gallery',
'action' => 'list',
),
),
),
),
),
Expand All @@ -147,6 +245,8 @@
'controllers' => array(
'invokables' => array(
'PlaygroundGallery\Controller\Admin\GalleryAdmin' => 'PlaygroundGallery\Controller\Admin\GalleryAdminController',
'PlaygroundGallery\Controller\Api\Gallery' => 'PlaygroundGallery\Controller\Api\GalleryController',
'PlaygroundGallery\Controller\Api\Api' => 'PlaygroundGallery\Controller\Api\ApiController',
),
),
'navigation' => array(
Expand All @@ -160,4 +260,31 @@
),
),
'autorize_user' => true,
'assetic_configuration' => array(
'modules' => array(
'playground_gallery' => array(
# module root path for your css and js files
'root_path' => array(
__DIR__ . '/../view/lib/',
),
# collection of assets
'collections' => array(
'head_playgroundgallery_js' => array(
'assets' => array(
'admin.js' => 'js/playground_gallery.js',
),
'options' => array(
'output' => 'zfcadmin/js/head_playgroundgallery.js',
),
),
),
),
),

'routes' => array(
'admin.*' => array(
'@head_playgroundgallery_js' => '@head_playgroundgallery_js',
),
),
),
);
Loading

0 comments on commit 4afb16c

Please sign in to comment.