common/models/resources/FormField.php
public function getFieldValue() {

		switch( $this->type ) {

			case self::TYPE_TEXT:
			case self::TYPE_TEXTAREA:
			case self::TYPE_RADIO:
			case self::TYPE_RADIO_GROUP:
			case self::TYPE_SELECT:
			case self::TYPE_RATING:
			case self::TYPE_ICON:
			case self::TYPE_CHECKBOX_GROUP: {

				return $this->value;
			}
			case self::TYPE_PASSWORD: {

				return null;
			}
			case self::TYPE_CHECKBOX:
			case self::TYPE_TOGGLE: {

				return Yii::$app->formatter->asBoolean( $this->value );
			}
		}
	}
public function getFieldValue() {

		switch( $this->type ) {

			case self::TYPE_TEXT:
			case self::TYPE_TEXTAREA:
			case self::TYPE_RADIO:
			case self::TYPE_RADIO_GROUP:
			case self::TYPE_SELECT:
			case self::TYPE_RATING:
			case self::TYPE_ICON:
			case self::TYPE_CHECKBOX_GROUP: {

				return $this->value;
			}
			case self::TYPE_PASSWORD: {

				return null;
			}
			case self::TYPE_CHECKBOX:
			case self::TYPE_TOGGLE: {

				return Yii::$app->formatter->asBoolean( $this->value );
			}
		}
	}
public function getFieldValue ( ) { switch ( $ this -> type ) { case self :: TYPE_TEXT : case self :: TYPE_TEXTAREA : case self :: TYPE_RADIO : case self :: TYPE_RADIO_GROUP : case self :: TYPE_SELECT : case self :: TYPE_RATING : case self :: TYPE_ICON : case self :: TYPE_CHECKBOX_GROUP : { return $ this -> value ; } case self :: TYPE_PASSWORD : { return null ; } case self :: TYPE_CHECKBOX : case self :: TYPE_TOGGLE : { return Yii :: $ app -> formatter -> asBoolean ( $ this -> value ) ; } } }
Identify the field value type and return the value according to type.

@return mixed
Identify the field value type and return the value according to type .