本文整理汇总了PHP中JUDownloadHelper::getLicenseOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDownloadHelper::getLicenseOptions方法的具体用法?PHP JUDownloadHelper::getLicenseOptions怎么用?PHP JUDownloadHelper::getLicenseOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUDownloadHelper
的用法示例。
在下文中一共展示了JUDownloadHelper::getLicenseOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOptions
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;
}
示例2:
</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>
示例3:
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>
示例4: getSearchInput
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__);
}