/** * Get the selected value * * @return string */ public function getValue() { $options = parent::getValue(); if (count($options)) { return $options[0]->getName(); } return ''; }
/** * Get the selected value * * @return string */ public function getValue() { $options = parent::getValue(); if (count($options)) { if (empty($options[0])) { $collection = $options->getValues(); return $collection[0]->getName(); } return $options[0]->getName(); } return ''; }