I wanna create the admin panel as a module. It's rather simple. I have four parts in it: movies, photos, articles and news. Each of these parts has three actions: edit, add, delete ( and maybe move ). In url it must looks like:
Quote
movies/admin ( just for display list of movies in admin panel)
movies/edit/movie_id
movies/delete/movie_id
photos/admin
photos/edit/photo_id
photos/delete/photo_id
etc...
movies/edit/movie_id
movies/delete/movie_id
photos/admin
photos/edit/photo_id
photos/delete/photo_id
etc...
It's only for admin panel. But for diplaying on website we need some more action ( for example for the photos: view, size in, download ... ).
And all of this placed in one controller - in PhotosController. But I want to separate the admin part from users part, place ones in different controllers. All admin actions in AdminController, and others in appropriate controllers: PhotosController, MoviesController, etc.
But in this case I faced the problem. So we have action movieAction in AdminController, and we need at least three additional actions for this action: add, edit, move, list... And I dont know the right way to do this. I have only one idea is place the switch construction in each action:
public function movieAction() { switch ( $_GET['subaction'] ) { case 'add': .. break; case 'edit': ... break; ... } }
But it looks terrible

Is there any other ideas for realize it?