Pages management module
Installation
composer require cookyii/module-page:dev-master
Configuration
1. Update config
In backend
app
config
in section modules
add cookyii\modules\Page\backend\Module
and in section bootstrap
add page
:, (*1)
// ./backend-app/config/app.php
return [
// ...
'bootstrap' => [
// some components ...
'page'
],
'modules' => [
// some modules ...
'page' => 'cookyii\modules\Page\backend\Module',
],
// ...
];
In frontend
app
config
in section modules
add cookyii\modules\Page\frontend\Module
and in section bootstrap
add page
:, (*2)
// ./backend-app/config/app.php
return [
// ...
'bootstrap' => [
// some components ...
'page'
],
'modules' => [
// some modules ...
'page' => 'cookyii\modules\Page\frontend\Module',
],
// ...
];
2. Dependencies
Also, you need to configure the following modules (they are already downloaded):, (*3)
// ./backend-app/config/app.php
return [
// ...
'bootstrap' => [
// some components ...
'account', 'page', 'postman', 'media',
],
'modules' => [
// some modules ...
'account' => 'cookyii\modules\Account\backend\Module',
'page' => 'cookyii\modules\Page\backend\Module',
'postman' => 'cookyii\modules\Postman\backend\Module',
'media' => 'cookyii\modules\Media\backend\Module',
],
// ...
];
// ./frontend-app/config/app.php
return [
// ...
'bootstrap' => [
// some components ...
'page', 'media',
],
'modules' => [
// some modules ...
'page' => 'cookyii\modules\Page\frontend\Module',
'media' => 'cookyii\modules\Media\backend\Module',
],
// ...
];
3. Add new permissions
In rbac/update
command add merge class cookyii\modules\Page\backend\Permissions
:, (*4)
// ./common/commands/RbacCommand.php
class RbacCommand extends \rmrevin\yii\rbac\Command
{
public $backendMerge = [
// ...
'cookyii\modules\Account\backend\Permissions',
'cookyii\modules\Page\backend\Permissions',
'cookyii\modules\Postman\backend\Permissions',
];
}
4. Update permissions
./backend rbac/update
5. Execute new migrations
./frontend migrate