2017 © Pedro Peláez
 

yii2-extension yii2-settings

Yii2 settings with database module with GUI manager supported

image

johnitvn/yii2-settings

Yii2 settings with database module with GUI manager supported

  • Saturday, March 5, 2016
  • by johnitvn
  • Repository
  • 4 Watchers
  • 24 Stars
  • 903 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 16 Forks
  • 3 Open issues
  • 7 Versions
  • 3 % 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 johnitvn/yii2-settings "*"

or add, (*6)

"johnitvn/yii2-settings": "*"

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

Usage

Add settings into component config:

'components' => [        
    'settings'=>[
        'class'=>'johnitvn\settings\Settings'
    ],
],

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'=>'johnitvn\settings\Module',
    ]       
]

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

The Versions

05/03 2016

dev-master

9999999-dev

Yii2 settings with database module with GUI manager supported

  Sources   Download

Apache-2.0

The Requires

 

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