2017 © Pedro Peláez
 

yii2-extension yii2-settings

Yii2 settings with database module with GUI manager supported

image

newrow/yii2-settings

Yii2 settings with database module with GUI manager supported

  • Tuesday, August 1, 2017
  • by nireli100
  • Repository
  • 1 Watchers
  • 0 Stars
  • 484 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 16 Forks
  • 0 Open issues
  • 9 Versions
  • 8 % Grown

The README.md

yii2-settings

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

Yii2 settings with database module with GUI manager supported, (*2)

yii2-settings, (*3)

Installation

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

Either run, (*5)

php composer.phar require --prefer-dist newrow/yii2-settings "*"

or add, (*6)

"newrow/yii2-settings": "*"

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

Usage

Add settings into component config:

'components' => [        
    'settings'=>[
        'class'=>'newrow\settings\Settings',
        'roles' => ['admin'],  
    ],
],

Ok let see this codesnipet to use:

$settings = Yii::$app->settings;

$value = $settings->get('section,'key');

$settings->set('section','key', 'value', 'integer');

$settings->delete('section,'key');

$settings->deleteAll('section,'key');

$settings->clearCache(); // automatic call when use set()

Look at line:

$settings->set($section,$key,$value,$type);

You can use $section for distribute setting such as system,user... And the $type will be use for get settings. This extension have used settype for set the type of a setting when you get it, (*8)

If you want to manager setting with GUI then add settings into module config:

'modules' => [
    'settings' =>  [
        'class'=>'newrow\settings\Module',
    ]       
]

And go to localhost/index.php?r=settings/manager/index.php, (*9)

The Versions

01/08 2017

dev-master

9999999-dev

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

by Nir Eli

01/08 2017

1.0.7

1.0.7.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

by Nir Eli

20/06 2017

1.0.6

1.0.6.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

by Nir Eli

01/02 2016

1.0.5

1.0.5.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

11/07 2015

1.0.4

1.0.4.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

09/07 2015

1.0.3

1.0.3.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

07/07 2015

1.0.2

1.0.2.0

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

03/07 2015

1.0.1

1.0.1.0

Yii2 settings with database module

  Sources   Download

Apache-2.0

The Requires

 

30/06 2015

1.0.0

1.0.0.0

Yii2 settings with database module

  Sources   Download

Apache-2.0

The Requires