I have 2 Admin contollers.

PostContoller
CategoriesController

How can I Create them inside Blog Plugin, If I want. Can a plugin have more than one Controller, Admin or Public.

I tried to Create PostAdminContoller and extend AdminController, but dont know how to Call it like

?aa=Post.index

有帮助吗?

解决方案

There are three controllers that are available by default:

AdminController SiteController PublicController

If you want more controllers, use routes (http://www.impresspages.org/docs/routing) but then you have to do security checks on your own:

\Ip\Internal\Admin\Backend::userId() //check if admin is logged in

ipAdminPermission($plugin) //check if current admin has right to access plugin.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top