paulzi/cmyii

CMYii - is CMS admin system based on Yii Framework 2

Maintainers

Details

github.com/paulzi/cmyii

Source

Issues

Installs: 148

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 12

Type:yii2-extension


README

CMYii - is CMS admin system based on Yii Framework 2.

CMYii provides only a framework for management with data, you need to implement the data blocks yourself.

This module provides the admin system itself.

Install

composer require paulzi/cmyii

Usage

Apply migrations

Apply migrations in migrations folder. To do this, use one of the following methods:

  1. Add paulzi\cmyii\migrations namespace to your console app:
return [
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationPath' => null,
            'migrationNamespaces' => [
                'console\migrations',
                'paulzi\cmyii\migrations',
            ],
        ],
    ],
]
  1. Run command:
./yii migrate --migrationPath= --migrationNamespaces=paulzi\cmyii\migrations

Specify in the configs of the application:

return [
    'bootstrap' => ['cmyii'],
    'modules' => [
        'cmyii' => [
            'class' => 'paulzi\cmyii\Cmyii',
        ],
        'admin' => [
            'class' => 'paulzi\cmyii\admin\CmyiiAdmin',
            'adminBlocks' => [
                'common\cmyii\text\TextAdminWidget',
            ],
        ],
    ],
];

Add area in layout

Add Area widgets in your layout:

<?= \paulzi\cmyii\widgets\Area::widget(['id' => 'main']) ?>

Configure RBAC

Configure RBAC and add admin role.

Implement block widget

See in example folder for text block widget sample.

Add your first layout and site (example domains: http?://*).

Include widget in adminBlocks section of config module.

Go to admin

Follow to URL http://yourdomain/admin/ and add block on page.

Documentation

To do