Brad Morris
Brad Morris

Reputation: 365

"Sub Controllers" in Zend Framework

I am developing an application with the Zend Frameworks.

I currently have the Controller admin, which has its appropriate actions

I have the action "Users", and and I would like to be able to make this its own controller, so all the relevant actions are under their own class

Admin {
    Users {
        Add
        Delete
        Import
    }
}

Upvotes: 2

Views: 372

Answers (2)

akond
akond

Reputation: 16035

I think what you really need is an Action Helper, since add/delete/import "actions" are more or less ubiquitous.

Upvotes: -1

Yeroon
Yeroon

Reputation: 3243

Restructure your code using modules. Admin should become a module. Inside the Admin module you should have the controller Users. This controller has the actions add, delete and import.

Upvotes: 6

Related Questions