paulzi / cmyii
CMYii - is CMS admin system based on Yii Framework 2
Requires
- paulzi/cmyii-core: ^0.1.0
This package is auto-updated.
Last update: 2026-05-18 12:01:49 UTC
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:
- Add
paulzi\cmyii\migrationsnamespace to your console app:
return [ 'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => null, 'migrationNamespaces' => [ 'console\migrations', 'paulzi\cmyii\migrations', ], ], ], ]
- 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