/** * Method to get the field options. * * @since 2.0 * * @return array The field option objects. */ protected function getOptions() { $options = parent::getOptions(); $noneoption = $this->element['none'] ? $this->element['none'] : null; if ($noneoption) { array_unshift($options, JHtml::_('select.option', '*', JText::_($noneoption))); } return $options; }
/** * Method to get the field options. * * @since 2.0 * * @return array The field option objects. */ protected function getOptions() { $client = (string) $this->element['client']; if ($client != 'site' && $client != 'administrator') { $client = 'site'; } if (!isset(static::$cachedOptions[$client])) { static::$cachedOptions[$client] = parent::getOptions(); } $options = array_merge(static::$cachedOptions[$client]); $noneoption = $this->element['none'] ? $this->element['none'] : null; if ($noneoption) { array_unshift($options, JHtml::_('select.option', '*', JText::_($noneoption))); } return $options; }