PHP code example of ekalokman / yii2-rgis-by-kcd
1. Go to this page and download the library: Download ekalokman/yii2-rgis-by-kcd library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ekalokman / yii2-rgis-by-kcd example snippets
return [
...
'aliases' => [
'@ekalokman/AdminPgsql' => 'path/to/your/extracted',
...
]
];
return [
'modules' => [
'admin' => [
'class' => 'ekalokman\AdminPgsql\Module',
...
]
...
],
...
'components' => [
....
'authManager' => [
'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
]
],
'as access' => [
'class' => 'ekalokman\AdminPgsql\components\AccessControl',
'allowActions' => [
'admin/*', // add or remove allowed actions to this list
]
],
];
'modules' => [
'admin' => [
...,
'controllerMap' => [
'assignment' => [
'class' => 'ekalokman\AdminPgsql\controllers\AssignmentController',
'userClassName' => 'path\to\models\User',
'idField' => 'user_id', // id field of model User
]
],
...
]
...
],
'modules' => [
'admin' => [
...,
'layout' => 'left-menu', // default null. other avaliable value 'right-menu' and 'top-menu'
],
...
],
'modules' => [
'admin' => [
...,
'layout' => 'left-menu', // default null. other avaliable value 'right-menu' and 'top-menu'
'menus' => [
'assignment' => [
'label' => 'Grand Access' // change label
],
'route' => null, // disable menu
],
],
...
],