| @@ 11-55 (lines=45) @@ | ||
| 8 | /** |
|
| 9 | * @author Borut Balažek <[email protected]> |
|
| 10 | */ |
|
| 11 | class UsersControllerProvider implements ControllerProviderInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param Application $app |
|
| 15 | * |
|
| 16 | * @return \Silex\ControllerCollection |
|
| 17 | */ |
|
| 18 | public function connect(Application $app) |
|
| 19 | { |
|
| 20 | $controllers = $app['controllers_factory']; |
|
| 21 | ||
| 22 | $controllers->match( |
|
| 23 | '', |
|
| 24 | 'Application\Controller\MembersArea\UsersController::listAction' |
|
| 25 | ) |
|
| 26 | ->bind('members-area.users'); |
|
| 27 | ||
| 28 | $controllers->match( |
|
| 29 | '/new', |
|
| 30 | 'Application\Controller\MembersArea\UsersController::newAction' |
|
| 31 | ) |
|
| 32 | ->bind('members-area.users.new'); |
|
| 33 | ||
| 34 | $controllers->match( |
|
| 35 | '/{id}', |
|
| 36 | 'Application\Controller\MembersArea\UsersController::detailAction' |
|
| 37 | ) |
|
| 38 | ->bind('members-area.users.detail'); |
|
| 39 | ||
| 40 | $controllers->match( |
|
| 41 | '/{id}/edit', |
|
| 42 | 'Application\Controller\MembersArea\UsersController::editAction' |
|
| 43 | ) |
|
| 44 | ->bind('members-area.users.edit'); |
|
| 45 | ||
| 46 | $controllers->match( |
|
| 47 | '/{id}/remove', |
|
| 48 | 'Application\Controller\MembersArea\UsersController::removeAction' |
|
| 49 | ) |
|
| 50 | ->bind('members-area.users.remove'); |
|
| 51 | ||
| 52 | return $controllers; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| @@ 11-58 (lines=48) @@ | ||
| 8 | /** |
|
| 9 | * @author Borut Balažek <[email protected]> |
|
| 10 | */ |
|
| 11 | class MembersAreaControllerProvider implements ControllerProviderInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param Application $app |
|
| 15 | * |
|
| 16 | * @return \Silex\ControllerCollection |
|
| 17 | */ |
|
| 18 | public function connect(Application $app) |
|
| 19 | { |
|
| 20 | $controllers = $app['controllers_factory']; |
|
| 21 | ||
| 22 | /* |
|
| 23 | * Members Area - Dashboard / Index |
|
| 24 | */ |
|
| 25 | $controllers->match( |
|
| 26 | '', |
|
| 27 | 'Application\Controller\MembersAreaController::indexAction' |
|
| 28 | ) |
|
| 29 | ->bind('members-area'); |
|
| 30 | ||
| 31 | $controllers->match( |
|
| 32 | '/login', |
|
| 33 | 'Application\Controller\MembersAreaController::loginAction' |
|
| 34 | ) |
|
| 35 | ->bind('members-area.login'); |
|
| 36 | ||
| 37 | $controllers->match( |
|
| 38 | '/logout', |
|
| 39 | 'Application\Controller\MembersAreaController::logoutAction' |
|
| 40 | ) |
|
| 41 | ->bind('members-area.logout'); |
|
| 42 | ||
| 43 | $controllers->match( |
|
| 44 | '/register', |
|
| 45 | 'Application\Controller\MembersAreaController::registerAction' |
|
| 46 | ) |
|
| 47 | ->bind('members-area.register'); |
|
| 48 | ||
| 49 | $controllers->match( |
|
| 50 | '/reset-password', |
|
| 51 | 'Application\Controller\MembersAreaController::resetPasswordAction' |
|
| 52 | ) |
|
| 53 | ->bind('members-area.reset-password'); |
|
| 54 | ||
| 55 | return $controllers; |
|
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| @@ 11-54 (lines=44) @@ | ||
| 8 | /** |
|
| 9 | * @author Borut Balažek <[email protected]> |
|
| 10 | */ |
|
| 11 | class MyControllerProvider implements ControllerProviderInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param Application $app |
|
| 15 | * |
|
| 16 | * @return \Silex\ControllerCollection |
|
| 17 | */ |
|
| 18 | public function connect(Application $app) |
|
| 19 | { |
|
| 20 | $controllers = $app['controllers_factory']; |
|
| 21 | ||
| 22 | $controllers->match( |
|
| 23 | '', |
|
| 24 | 'Application\Controller\MembersArea\MyController::indexAction' |
|
| 25 | ) |
|
| 26 | ->bind('members-area.my'); |
|
| 27 | ||
| 28 | $controllers->match( |
|
| 29 | '/profile', |
|
| 30 | 'Application\Controller\MembersArea\MyController::profileAction' |
|
| 31 | ) |
|
| 32 | ->bind('members-area.my.profile'); |
|
| 33 | ||
| 34 | $controllers->match( |
|
| 35 | '/settings', |
|
| 36 | 'Application\Controller\MembersArea\MyController::settingsAction' |
|
| 37 | ) |
|
| 38 | ->bind('members-area.my.settings'); |
|
| 39 | ||
| 40 | $controllers->match( |
|
| 41 | '/password', |
|
| 42 | 'Application\Controller\MembersArea\MyController::passwordAction' |
|
| 43 | ) |
|
| 44 | ->bind('members-area.my.password'); |
|
| 45 | ||
| 46 | $controllers->match( |
|
| 47 | '/actions', |
|
| 48 | 'Application\Controller\MembersArea\MyController::actionsAction' |
|
| 49 | ) |
|
| 50 | ->bind('members-area.my.actions'); |
|
| 51 | ||
| 52 | return $controllers; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||