getTypes(); } // Prepare the grouped list $groups = array(); $groups[0]['items'] = array( \Joomla\CMS\HTML\HTMLHelper::_('select.option','', '-- '.\Joomla\CMS\Language\Text::_('FLEXI_DISABLE').' --') ); foreach($jm_types as $type => $tdata) { $options = array(); foreach($tdata['properties'] as $propname => $props) { $options[] = \Joomla\CMS\HTML\HTMLHelper::_('select.option', $propname, $propname); } $grp = (string) $type; $groups[$grp] = array(); $groups[$grp]['id'] = null; $groups[$grp]['text'] = \Joomla\CMS\Language\Text::_($type); $groups[$grp]['items'] = $options; } // Render and return the drop down select return \Joomla\CMS\HTML\HTMLHelper::_('select.groupedlist', $groups, $this->name, array( 'id' => $this->id, 'group.id' => 'id', 'list.attr' => array('class'=> 'use_select2_lib inputbox'), 'list.select' => $this->value, 'option.attr' => 'attr', // need to set the name we use for options attributes ) ); } }