本文整理汇总了PHP中BannersHelper::getClientOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP BannersHelper::getClientOptions方法的具体用法?PHP BannersHelper::getClientOptions怎么用?PHP BannersHelper::getClientOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BannersHelper
的用法示例。
在下文中一共展示了BannersHelper::getClientOptions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_banners', 'category', $this->state->get('filter.category_id'));
JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_TRACKS'), 'bookmark banners-tracks');
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Popup', 'download', 'JTOOLBAR_EXPORT', 'index.php?option=com_banners&view=download&tmpl=component', 600, 300);
if ($canDo->get('core.delete')) {
$bar->appendButton('Confirm', 'COM_BANNERS_DELETE_MSG', 'delete', 'COM_BANNERS_TRACKS_DELETE', 'tracks.delete', false);
JToolbarHelper::divider();
}
if ($canDo->get('core.admin') || $canDo->get('core.options')) {
JToolbarHelper::preferences('com_banners');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_TRACKS');
JHtmlSidebar::setAction('index.php?option=com_banners&view=tracks');
JHtmlSidebar::addFilter(JText::_('COM_BANNERS_SELECT_CLIENT'), 'filter_client_id', JHtml::_('select.options', BannersHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_banners'), 'value', 'text', $this->state->get('filter.category_id')));
JHtmlSidebar::addFilter(JText::_('COM_BANNERS_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', array(JHtml::_('select.option', 1, JText::_('COM_BANNERS_IMPRESSION')), JHtml::_('select.option', 2, JText::_('COM_BANNERS_CLICK'))), 'value', 'text', $this->state->get('filter.type')));
}
示例2:
echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true);
?>
</select>
<label class="selectlabel" for="filter_client_id">
<?php
echo JText::_('COM_BANNERS_SELECT_CLIENT');
?>
</label>
<select name="filter_client_id" class="inputbox" id="filter_client_id">
<option value=""><?php
echo JText::_('COM_BANNERS_SELECT_CLIENT');
?>
</option>
<?php
echo JHtml::_('select.options', BannersHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id'));
?>
</select>
<label class="selectlabel" for="filter_category_id">
<?php
echo JText::_('JOPTION_SELECT_CATEGORY');
?>
</label>
<select name="filter_category_id" class="inputbox" id="filter_category_id">
<option value=""><?php
echo JText::_('JOPTION_SELECT_CATEGORY');
?>
</option>
<?php
echo JHtml::_('select.options', JHtml::_('category.options', 'com_banners'), 'value', 'text', $this->state->get('filter.category_id'));
示例3: getOptions
/**
* Method to get the field options.
*
* @return array The field option objects.
* @since 1.6
*/
public function getOptions()
{
return BannersHelper::getClientOptions();
}
示例4: getOptions
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 1.6
*/
public function getOptions()
{
return array_merge(parent::getOptions(), BannersHelper::getClientOptions());
}
示例5: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/banners.php';
$canDo = BannersHelper::getActions($this->state->get('filter.category_id'));
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_BANNERS'), 'banners.png');
if (count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0) {
JToolbarHelper::addNew('banner.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('banner.edit');
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.state') != 2) {
JToolbarHelper::publish('banners.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('banners.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($this->state->get('filter.state') != -1) {
if ($this->state->get('filter.state') != 2) {
JToolbarHelper::archiveList('banners.archive');
} elseif ($this->state->get('filter.state') == 2) {
JToolbarHelper::unarchiveList('banners.publish');
}
}
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::checkin('banners.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'banners.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('banners.trash');
}
// Add a batch button
if ($user->authorise('core.edit')) {
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_banners');
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS');
JHtmlSidebar::setAction('index.php?option=com_banners&view=banners');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
JHtmlSidebar::addFilter(JText::_('COM_BANNERS_SELECT_CLIENT'), 'filter_client_id', JHtml::_('select.options', BannersHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_banners'), 'value', 'text', $this->state->get('filter.category_id')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
}
示例6: getOptions
/**
* Method to get the field options.
*
* @return array The field option objects.
*
* @since 1.6
*/
public function getOptions()
{
$options = BannersHelper::getClientOptions();
return array_merge(parent::getOptions(), $options);
}