src/controllers/SettingsController.php
public function actionSet ($name, $value, $description = null)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}
			else
			{
				$object->value = $value;
				if (!is_null($description))
					$object->description = $description;
			}
			$object->save();
			$this->actionList();
		}
public function actionSet ($name, $value, $description = null)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}
			else
			{
				$object->value = $value;
				if (!is_null($description))
					$object->description = $description;
			}
			$object->save();
			$this->actionList();
		}
public function actionSet ( $ name , $ value , $ description = null ) { $ class = $ this -> _modelClass ; $ object = $ class :: find ( ) -> where ( [ 'name' => $ name ] ) -> one ( ) ; if ( $ object == null ) { Console :: printColor ( 'Setting not found.' , 'red' ) ; Yii :: $ app -> end ( ) ; } else { $ object -> value = $ value ; if ( ! is_null ( $ description ) ) $ object -> description = $ description ; } $ object -> save ( ) ; $ this -> actionList ( ) ; }
Updates or creates setting with given name and value.

@param $name
@param $value
@param $description
Updates or creates setting with given name and value .