cookyii/module-page

Static pages management module for Cookyii CMF

Installs: 323

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

dev-master 2017-02-03 10:55 UTC

This package is not auto-updated.

Last update: 2024-12-21 18:24:51 UTC


README

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:

// ./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:

// ./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):

// ./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:

// ./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