simplator / admin
This package is abandoned and no longer maintained.
No replacement package was suggested.
Yii2 admin tools
0.2.0
2015-12-05 20:36 UTC
Requires
This package is not auto-updated.
Last update: 2018-07-31 00:37:59 UTC
README
Yii2 admin
Bases on pheme/yii2-admin
Added multidomain configuration
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist simplator/admin "*"
or add
"simplator/admin": "*"
to the require section of your composer.json file.
Subsequently, run
./yii migrate --migrationPath=@yii/rbac/migrations/
in order to create the admin table in your database.
Usage
There are 2 parts to this extension. A module and a component. The module provides a simple GUI to edit your admin. The component provides a way to retrieve and save admin programmatically.
Add this to your main configuration's modules array
'modules' => [ 'admin' => [ 'class' => 'simplator\admin\Module', ], ... ],
Add this to your main configuration's components array
'components' => [ 'admin' => [ 'class' => 'simplator\admin\components\admin' ], ... ]
Typical component usage
$admin = Yii::$app->admin; $value = $admin->get('section.key'); $value = $admin->get('key', 'section'); $admin->set('section.key', 'value'); $admin->set('section.key', 'value', null, 'string'); $admin->set('key', 'value', 'section', 'integer'); // Automatically called on set(); $admin->clearCache();