src/controllers/SettingsController.php
public function actionDelete ($name)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}

			if ($this->confirm("Remove setting '" . $name . "'?"))
			{
				if ($object->delete())
					Console::printColor('Setting deleted.', 'green');
				else
					Console::printColor(current($object->getFirstErrors()), 'red');
			}
		}
public function actionDelete ($name)
		{
			$class = $this->_modelClass;
			$object = $class::find()->where([ 'name' => $name ])->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}

			if ($this->confirm("Remove setting '" . $name . "'?"))
			{
				if ($object->delete())
					Console::printColor('Setting deleted.', 'green');
				else
					Console::printColor(current($object->getFirstErrors()), 'red');
			}
		}
public function actionDelete ( $ name ) { $ class = $ this -> _modelClass ; $ object = $ class :: find ( ) -> where ( [ 'name' => $ name ] ) -> one ( ) ; if ( $ object == null ) { Console :: printColor ( 'Setting not found.' , 'red' ) ; Yii :: $ app -> end ( ) ; } if ( $ this -> confirm ( "Remove setting '" . $ name . "'?" ) ) { if ( $ object -> delete ( ) ) Console :: printColor ( 'Setting deleted.' , 'green' ) ; else Console :: printColor ( current ( $ object -> getFirstErrors ( ) ) , 'red' ) ; } }
Deletes setting with given name.

@param $name
Deletes setting with given name .