Now that our module is set up, we can start by moving the functionality from our application controllers and theme into our dashboard module. We'll go over everything that is needed for each model: Categories, Content, and Users.
In this next section, we will migrate all of the management functionalities we built in the previous chapter into our new module:
Starting with our
ContentController
, we first want to remove theactionAdmin()
,actionSave()
, andactionDelete()
methods from theContentController.php
file atprotected/controllers/
.Next, we should remove the access control properties for the actions we just deleted from our
ContentController
. The restoredaccessRules()
method should look as follows:public function accessRules() { return array( array('allow', 'actions' => array('index', 'view', 'search'), 'users' => array('*') ), array('deny', // deny all users ...