protected function getInput() { $this->params = $this->element->attributes(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); $options = array(); $templates = $this->getTemplates(); foreach ($templates as $styles) { $level = 0; foreach ($styles as $style) { $style->level = $level; $options[] = $style; if (count($styles) <= 2) { $level = 0; break; } $level = 1; } } // fix old '::' separator and change it to '--' $value = json_encode($this->value); $value = str_replace('::', '--', $value); $value = (array) json_decode($value, true); return RLHtml::selectlist($options, $this->name, $value, $this->id, $size, $multiple); }
protected function getInput() { $this->params = $this->element->attributes(); $size = (int) $this->get('size'); $multiple = $this->get('multiple', 0); RLFunctions::loadLanguage('com_menus', JPATH_ADMINISTRATOR); $options = $this->getMenuItems(); require_once dirname(__DIR__) . '/helpers/html.php'; return RLHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); }
protected function getInput() { $this->params = $this->element->attributes(); if (!is_array($this->value)) { $this->value = explode(',', $this->value); } foreach ($this->element->children() as $item) { $item_value = (string) $item['value']; $item_name = JText::_(trim((string) $item)); $item_disabled = (int) $item['disabled']; $options[] = JHtml::_('select.option', $item_value, $item_name, 'value', 'text', $item_disabled); } $size = (int) $this->get('size'); require_once dirname(__DIR__) . '/helpers/html.php'; return RLHtml::selectlist($options, $this->name, $this->value, $this->id, $size, 1); }
public function getSelectList($group = '') { if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $size = (int) $this->get('size'); $multiple = $this->get('multiple'); $group = $group ?: $this->getGroup(); $options = $this->getOptions(); require_once __DIR__ . '/html.php'; switch ($group) { case 'categories': return RLHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return RLHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } }
protected function getInput() { $this->params = $this->element->attributes(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); $show_all = $this->get('show_all'); $options = $this->getUserGroups(); if ($show_all) { $option = new stdClass(); $option->value = -1; $option->text = '- ' . JText::_('JALL') . ' -'; $option->disable = ''; array_unshift($options, $option); } require_once dirname(__DIR__) . '/helpers/html.php'; return RLHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); }
protected function getInput() { $this->params = $this->element->attributes(); $size = (int) $this->get('size'); // assemble items to the array $options = array(); if ($this->get('show_ignore')) { if (in_array('-1', $this->value)) { $this->value = array('-1'); } $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('RL_IGNORE') . ' -', 'value', 'text', 0); $options[] = JHtml::_('select.option', '-', ' ', 'value', 'text', 1); } $options = array_merge($options, $this->getTags()); require_once dirname(__DIR__) . '/helpers/html.php'; return RLHtml::selectlist($options, $this->name, $this->value, $this->id, $size, 1); }