2017 © Pedro Peláez
 

yii2-extension yii2-params

Yii2 params files managment

image

fgh151/yii2-params

Yii2 params files managment

  • Thursday, November 9, 2017
  • by fgh151
  • Repository
  • 1 Watchers
  • 3 Stars
  • 135 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

Русская документация скоро будет доступна доступна на сайте OpenItStudio, (*1)

Yii2 params files management utility

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist fgh151/yii2-params "*"

or add, (*4)

"fgh151/yii2-params": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply add it in your config by :, (*6)

        'modules' => [
               ...
               'params' => [
                   'class' => 'fgh151\modules\params\Module',
                   'paramsFilePath' => [
                       'Common params' => '@common/config/params.php',
                       'Backend Params' => '@backend/config/params.php',
                       'Frontend Params' => '@frontend/config/params.php',
                   ]
               ]
           ],

add to paramsFilePath array names of files and path to them, (*7)

RBAC

You can use RBAC with module. Simply add it in your config:, (*8)

        'modules'    => [
             'params' => [
                'class' => 'fgh151\modules\params\Module',
                'paramsFilePath' => [
                    'Common params' => '@common/config/params.php',
                    'Backend Params' => '@backend/config/params.php',
                    'Frontend Params' => '@frontend/config/params.php',
                ],
                'as access' => [
                    'class' => 'yii\filters\AccessControl',
                    'rules' => [
                        [
                            'allow' => true,
                            'roles' => ['admin'],
                        ]
                    ]
                ]
             ]
            ...
        ],

Usage

Pretty Url's /params, (*9)

No pretty Url's index.php?r=params, (*10)

The Versions

09/11 2017

dev-master

9999999-dev http://openitstudio.ru

Yii2 params files managment

  Sources   Download

GPL

The Requires

 

by Evgenii Dudal

yii2 params

09/11 2017

1.0.5

1.0.5.0 http://openitstudio.ru

Yii2 params files managment

  Sources   Download

GPL

The Requires

 

by Evgenii Dudal

yii2 params

24/03 2016

1.0.2

1.0.2.0 http://openitstudio.ru

Yii2 params files managment

  Sources   Download

GPL

The Requires

 

by Evgenii Dudal

yii2 params

23/03 2016

1.0.1

1.0.1.0 http://openitstudio.ru

Yii2 params files managment

  Sources   Download

GPL

The Requires

 

by Evgenii Dudal

yii2 params

23/03 2016

1.0.0

1.0.0.0 http://openitstudio.ru

Yii2 params files managment

  Sources   Download

GPL

The Requires

 

by Evgenii Dudal

yii2 params