Class pheme\settings\models\Setting

Inheritancepheme\settings\models\Setting » yii\db\ActiveRecord
Implementspheme\settings\models\SettingInterface
Subclassespheme\settings\models\SettingSearch

This is the model class for table "settings".

Method Details

activateSetting() public method

Activates a setting

public boolean activateSetting ( $section, $key )
$section
$key
return boolean

True on success, false on error

afterDelete() public method

public void afterDelete ( )
afterSave() public method

public void afterSave ( $insert, $changedAttributes )
$insert
$changedAttributes
attributeLabels() public method

public void attributeLabels ( )
beforeSave() public method

public void beforeSave ( $insert )
$insert
behaviors() public method

public array behaviors ( )
deactivateSetting() public method

Deactivates a setting

public boolean deactivateSetting ( $section, $key )
$section
$key
return boolean

True on success, false on error

deleteAllSettings() public method

Deletes all settings! Be careful!

public boolean deleteAllSettings ( )
return boolean

True on success, false on error

deleteSetting() public method

Deletes a settings

public boolean deleteSetting ( $section, $key )
$section
$key
return boolean

True on success, false on error

getSettings() public method

Gets a combined map of all the settings.

public array getSettings ( )
getTypes() public method

public array getTypes ( $forDropDown true )
$forDropDown bool

If false - return array or validators, true - key=>value for dropDown

rules() public method

public void rules ( )
setSetting() public method

Saves a setting

public bool setSetting ( $section, $key, $value, $type null )
$section
$key
$value
$type
throws \yii\base\InvalidConfigException
tableName() public static method

public static void tableName ( )