Nette\Forms\Controls\ChoiceControl::getValue PHP Method

getValue() public method

Returns selected key.
public getValue ( ) : string | integer
return string | integer
    public function getValue()
    {
        return array_key_exists($this->value, $this->items) ? $this->value : NULL;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Returns selected radio value.
  * @return mixed
  */
 public function getValue($raw = FALSE)
 {
     if ($raw) {
         trigger_error(__METHOD__ . '(TRUE) is deprecated; use getRawValue() instead.', E_USER_DEPRECATED);
         return $this->getRawValue();
     }
     return parent::getValue();
 }
All Usage Examples Of Nette\Forms\Controls\ChoiceControl::getValue