protected function getOptions() { $options = array(); foreach ($this->element->children() as $option) { if ($option->getName() != 'option') { continue; } $tmp = JHtml::_('select.option', (string) $option['value'], JText::alt(trim((string) $option), preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname)), 'value', 'text', (string) $option['disabled'] == 'true'); $tmp->class = (string) $option['class']; $tmp->onclick = (string) $option['onclick']; $options[] = $tmp; } reset($options); $_options = JUDownloadHelper::getLicenseOptions(); if ($_options) { $options = array_merge($options, $_options); } return $options; }
</option> <?php $categoryArr = JUDownloadHelper::getCategoryOptions(); ?> <?php echo JHtml::_('select.options', $categoryArr, 'value', 'text', $this->state->get('filter.catid')); ?> </select> <select name="filter_licenseid" class="input-medium" onchange="this.form.submit()"> <option value=""><?php echo JText::_('COM_JUDOWNLOAD_SELECT_LICENSE'); ?> </option> <?php $licenseArr = JUDownloadHelper::getLicenseOptions(); ?> <?php echo JHtml::_('select.options', $licenseArr, 'value', 'text', $this->state->get('filter.licenseid')); ?> </select> </div> </fieldset> <?php if (empty($this->items)) { ?> <div class="alert alert-no-items"> <?php echo JText::_('COM_JUDOWNLOAD_NO_MATCHING_RESULTS'); ?> </div>
echo JText::_('COM_JUDOWNLOAD_SELECT_CATEGORY'); ?> </option> <?php $options = JUDownloadHelper::getCategoryOptions(); echo JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.catid')); ?> </select> <select name="filter_licenseid" class="input-medium" onchange="this.form.submit()"> <option value=""><?php echo JText::_('COM_JUDOWNLOAD_SELECT_LICENSE'); ?> </option> <?php $options = JUDownloadHelper::getLicenseOptions(); echo JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.license')); ?> </select> <select name="filter_access" class="input-medium" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS'); ?> </option> <?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')); ?> </select> </div> </div>
public function getSearchInput($defaultValue = "") { if (!$this->isPublished()) { return ""; } $options = JUDownloadHelper::getLicenseOptions(); array_unshift($options, array('value' => '', 'text' => JText::_('COM_JUDOWNLOAD_SELECT_LICENSE'))); $this->setVariable('options', $options); $this->setVariable('value', $defaultValue); return $this->fetch('searchinput.php', __CLASS__); }