本文整理汇总了PHP中JToolbarHelper::preferences方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::preferences方法的具体用法?PHP JToolbarHelper::preferences怎么用?PHP JToolbarHelper::preferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::preferences方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* Method to configure the toolbar for this view.
*
* @return void
*
* @since 2.5
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_finder');
JToolbarHelper::title(JText::_('COM_FINDER_MAPS_TOOLBAR_TITLE'), 'zoom-in finder');
$toolbar = JToolbar::getInstance('toolbar');
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publishList('maps.publish');
JToolbarHelper::unpublishList('maps.unpublish');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin') || $canDo->get('core.options')) {
JToolbarHelper::preferences('com_finder');
}
JToolbarHelper::divider();
$toolbar->appendButton('Popup', 'bars', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_CONTENT_MAPS');
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'maps.delete');
JToolbarHelper::divider();
}
JHtmlSidebar::setAction('index.php?option=com_finder&view=maps');
JHtmlSidebar::addFilter('', 'filter_branch', JHtml::_('select.options', JHtml::_('finder.mapslist'), 'value', 'text', $this->state->get('filter.branch')), true);
JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
}
示例2: display
/**
* Display the view.
*
* @param string $tpl The subtemplate to display.
*
* @return void
*/
function display($tpl = null)
{
JToolbarHelper::title(JText::_('jUpgradePro'), 'jupgrade');
JToolbarHelper::custom('cpanel', 'back.png', 'back_f2.png', 'Back', false, false);
JToolbarHelper::preferences('com_jupgradepro', '500');
JToolbarHelper::spacer();
JToolbarHelper::custom('help', 'help.png', 'help_f2.png', 'Help', false, false);
JToolbarHelper::spacer();
// get params
$params = JComponentHelper::getParams('com_jupgradepro');
//
// Joomla bug: JInstaller not save the defaults params reading config.xml
//
$db = JFactory::getDBO();
if (!$params->get('method')) {
$default_params = '{"method":"rest","rest_hostname":"http:\\/\\/www.example.org\\/","rest_username":"","rest_password":"","rest_key":"","path":"","driver":"mysql","hostname":"localhost","username":"","password":"","database":"","prefix":"jos_","skip_checks":"0","skip_files":"1","skip_templates":"1","skip_extensions":"1","skip_core_users":"0","skip_core_categories":"0","skip_core_sections":"0","skip_core_contents":"0","skip_core_contents_frontpage":"0","skip_core_menus":"0","skip_core_menus_types":"0","skip_core_modules":"0","skip_core_modules_menu":"0","skip_core_banners":"0","skip_core_banners_clients":"0","skip_core_banners_tracks":"0","skip_core_contacts":"0","skip_core_newsfeeds":"0","skip_core_weblinks":"0","positions":"0","debug":"0"}';
$query = "UPDATE #__extensions SET `params` = '{$default_params}' WHERE `element` = 'com_jupgradepro'";
$db->setQuery($query);
$db->query();
// get params.. again
$params = JComponentHelper::getParams('com_jupgradepro');
}
// Load mooTools
//JHTML::_('behavior.mootools'); // 2.5
JHtml::_('behavior.framework', true);
$xmlfile = JPATH_COMPONENT_ADMINISTRATOR . '/jupgradepro.xml';
$xml = JFactory::getXML($xmlfile);
$this->params = $params;
$this->version = $xml->version[0];
parent::display($tpl);
}
示例3: addToolbar
protected function addToolbar()
{
$canDo = ReservaHelper::getActions();
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_RESERVA_MANAGER_EVENTOS'), '');
JToolbarHelper::addNew('evento.add');
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('evento.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('eventos.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('eventos.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('eventos.archive');
JToolbarHelper::checkin('eventos.checkin');
}
//agregar filtro a la vista para busqueda
JHtmlSidebar::setAction('index.php?option=com_reserva&view=eventos');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
/*
if ($canDo->get('core.delete'))
{
JToolBarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_DELETE');
}
se replaza el boton de borrado por envio a la papelera en vez de borrado completamente
*/
$state = $this->get('State');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'eventos.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('eventos.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_reserva');
}
}
示例4: display
function display($tpl = null) {
$db = JFactory::getDBO();
$query = "SELECT id FROM #__plugins WHERE element =".$db->quote('myApiComment');
$db->setQuery($query);
$id = $db->loadResult();
$row =& JTable::getInstance('plugin');
$row->load($id);
$plugin = & JPluginHelper::getPlugin('content', 'myApiComment');
if(is_object($plugin)){
$paramsdata = $plugin->params;
$paramsdefs = JPATH_SITE.DS.'plugins'.DS.'content'.DS.'myApiComment.xml';
$params = new JParameter( $paramsdata, $paramsdefs );
$this->assignRef('params',$params);
$this->assignRef('plugin',$row);
JToolbarHelper::save('savePlugin','save content');
JToolbarHelper::preferences('com_myapi');
}else{
global $mainframe;
$mainframe->redirect('index.php?option=com_plugins&view=plugin&task=edit&cid='.$id,'The myApiComment plugin needs to be ENABLED before you can configure it.');
}
parent::display($tpl);
}
示例5: display
/**
* Renders the view
*
* @param string $tpl Template name
*
* @return void
*
* @since 2.5.4
*/
public function display($tpl = null)
{
// Get data from the model.
$this->state = $this->get('State');
// Load useful classes.
$model = $this->getModel();
$this->loadHelper('select');
// Assign view variables.
$ftp = $model->getFTPOptions();
$this->assign('updateInfo', $model->getUpdateInformation());
$this->assign('methodSelect', JoomlaupdateHelperSelect::getMethods($ftp['enabled']));
// Set the toolbar information.
JToolbarHelper::title(JText::_('COM_JOOMLAUPDATE_OVERVIEW'), 'arrow-up-2 install');
JToolbarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
// Add toolbar buttons.
if (JFactory::getUser()->authorise('core.admin', 'com_joomlaupdate')) {
JToolbarHelper::preferences('com_joomlaupdate');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_JOOMLA_UPDATE');
// Load mooTools.
JHtml::_('behavior.framework', true);
// Include jQuery.
JHtml::_('jquery.framework');
// Load our Javascript.
$document = JFactory::getDocument();
$document->addScript('../media/com_joomlaupdate/default.js');
JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
if (!is_null($this->updateInfo['object'])) {
// Show the message if a update is found.
JFactory::getApplication()->enqueueMessage(JText::_('COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE'), 'notice');
}
// Render the view.
parent::display($tpl);
}
示例6: display
function display($cachable = false, $urlparams = false)
{
require_once JPATH_COMPONENT . '/helpers/admirorgallery.php';
if (!is_dir(JPATH_SITE . '/plugins/content/admirorgallery/')) {
JError::raiseWarning('2', JText::_('COM_PLUGIN_NOT_INSTALLED'));
}
AdmirorGalleryHelper::addSubmenu(JRequest::getCmd('view', 'control_panel'), JRequest::getCmd('AG_resourceType', ''));
$doc = JFactory::getDocument();
$viewType = $doc->getType();
$viewName = $this->input->get('view', $this->default_view);
$viewLayout = $this->input->get('layout', 'default', 'string');
$view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout));
JToolBarHelper::help("", false, "http://www.admiror-design-studio.com/admiror-joomla-extensions/admiror-gallery/user-manuals");
if (JFactory::getUser()->authorise('core.admin', 'com_admirorgallery')) {
JToolbarHelper::preferences('com_admirorgallery');
if ($viewName == 'resourcemanager') {
JToolbarHelper::custom('ag_install', 'ag_install', 'ag_install', 'JTOOLBAR_INSTALL', false, false);
JToolbarHelper::deleteList('COM_ADMIRORGALLERY_ARE_YOU_SURE', 'ag_uninstall', 'JTOOLBAR_UNINSTALL');
} else {
JToolbarHelper::custom('AG_apply', 'publish', 'publish', 'COM_ADMIRORGALLERY_APPLY_DESC', false, false);
JToolbarHelper::custom('AG_reset', 'unpublish', 'unpublish', 'COM_ADMIRORGALLERY_RESET_DESC', false, false);
}
}
$view->sidebar = JHtmlSidebar::render();
$doc->addScriptDeclaration('
AG_jQuery(function(){
// SET SHORCUTS
AG_jQuery(document).bind("keydown", "ctrl+return", function (){submitbutton("AG_apply");return false;});
AG_jQuery(document).bind("keydown", "ctrl+backspace", function (){submitbutton("AG_reset");return false;});
});//AG_jQuery(function()
');
parent::display();
}
示例7: addToolbar
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_localise', 'component');
JToolBarHelper::title(JText::sprintf('COM_LOCALISE_HEADER_MANAGER', JText::_('COM_LOCALISE_HEADER_PACKAGES')), 'install');
if ($canDo->get('localise.create')) {
JToolbarHelper::addNew('package.add');
}
if ($canDo->get('localise.edit')) {
JToolbarHelper::editList('package.edit');
}
if ($canDo->get('localise.create') || $canDo->get('localise.edit')) {
JToolbarHelper::divider();
}
if ($canDo->get('localise.delete')) {
JToolbarHelper::deleteList('COM_LOCALISE_MSG_PACKAGES_VALID_DELETE', 'packages.delete');
JToolBarHelper::divider();
}
JToolBarHelper::custom('package.download', 'out.png', 'out.png', 'JTOOLBAR_EXPORT', true);
JToolBarHelper::divider();
JToolBarHelper::custom('package.language', 'archive.png', 'archive.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_LANGUAGE', true);
JToolbarHelper::divider();
if ($canDo->get('package.batch')) {
JToolBarHelper::custom('package.batch', 'refresh.png', 'refresh.png', 'COM_LOCALISE_TOOLBAR_PACKAGES_BATCH', true);
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_localise');
JToolbarHelper::divider();
}
JToolBarHelper::help('screen.packages', true);
}
示例8: addToolbar
/**
* Method to configure the toolbar for this view.
*
* @return void
*
* @since 2.5
*/
protected function addToolbar()
{
$canDo = FinderHelper::getActions();
JToolbarHelper::title(JText::_('COM_FINDER_INDEX_TOOLBAR_TITLE'), 'zoom-in finder');
$toolbar = JToolbar::getInstance('toolbar');
$toolbar->appendButton('Popup', 'archive', 'COM_FINDER_INDEX', 'index.php?option=com_finder&view=indexer&tmpl=component', 500, 210, 0, 0, 'window.parent.location.reload()', 'COM_FINDER_HEADING_INDEXER');
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publishList('index.publish');
JToolbarHelper::unpublishList('index.unpublish');
}
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'index.delete');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('index.purge', 'COM_FINDER_INDEX_TOOLBAR_PURGE', false);
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_finder');
}
$toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_INDEXED_CONTENT');
JHtmlSidebar::setAction('index.php?option=com_finder&view=index');
JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_TYPE_FILTER'), 'filter_type', JHtml::_('select.options', JHtml::_('finder.typeslist'), 'value', 'text', $this->state->get('filter.type')));
}
示例9: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = MessagesHelper::getActions();
JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('message.add');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::divider();
JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::divider();
JToolbarHelper::trash('messages.trash');
}
//JToolbarHelper::addNew('module.add');
JToolbarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('COM_MESSAGES_TOOLBAR_MY_SETTINGS');
$dhtml = "<a class=\"btn modal btn-small\" href=\"index.php?option=com_messages&view=config&tmpl=component\"\n\t\t\t\t\trel=\"{handler:'iframe', size:{x:700,y:300}}\">\n\t\t\t\t\t<i class=\"icon-cog\" title=\"{$title}\"></i>{$title}</a>";
$bar->appendButton('Custom', $dhtml, 'config');
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_messages');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*/
protected function addToolbar()
{
$canDo = MarketplaceHelper::getActions();
$type = $this->state->get('filter.tags');
$section = $this->state->get('filter.section');
$this->section = ucfirst($section);
JToolBarHelper::title(JText::sprintf('COM_MARKETPLACE_HEADER_' . $this->getName(), $this->section), 'marketplace');
$repository_id = $this->state->get('filter.marketplace_repository_id');
$countStores = MarketplaceHelper::getExtensionTotalStores();
$stores = MarketplaceHelper::getExtensionStores();
if ($canDo->get('marketplace.findextensions')) {
if ($countStores) {
JToolBarHelper::custom($this->getName() . '.findextensions', 'refresh', 'refresh', 'COM_MARKETPLACE_TOOLBAR_FIND_EXTENSIONS', false, false);
}
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_marketplace');
JToolbarHelper::divider();
}
if (!empty($this->nr_extensions)) {
JHtmlSidebar::addFilter(JText::_('COM_MARKETPLACE_VALUE_REPOSITORY_SELECT'), 'filter_marketplace_repository_id', JHtml::_('select.options', $stores, 'value', 'text', $repository_id, true));
if ($this->state->get('filter.browse') == '') {
JHtmlSidebar::addFilter(JText::_('COM_MARKETPLACE_VALUE_TYPE_SELECT'), 'filter_tag', JHtml::_('select.options', MarketplaceHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.tags'), true));
}
JHtmlSidebar::addFilter(JText::_('COM_MARKETPLACE_VALUE_CATEGORY_SELECT'), 'filter_category', JHtml::_('select.options', MarketplaceHelper::getExtensionCategories(), 'value', 'text', $this->state->get('filter.category'), true));
JHtmlSidebar::addFilter(JText::_('COM_MARKETPLACE_VALUE_AUTHOR_SELECT'), 'filter_author', JHtml::_('select.options', MarketplaceHelper::getExtensionAuthors(), 'value', 'text', $this->state->get('filter.author'), true));
JHtmlSidebar::addFilter(JText::_('COM_MARKETPLACE_VALUE_PLAN_SELECT'), 'filter_plan', JHtml::_('select.options', MarketplaceHelper::getExtensionPlans(), 'value', 'text', $this->state->get('filter.plan'), true));
}
if ($countStores == 0) {
JFactory::getApplication()->redirect('index.php?option=com_marketplace&view=repositories', JText::_('COM_MARKETPLACE_MSG_REPOSITORIES_NO_REPOSITORIES'), 'warning');
}
MarketplaceHelper::addSubmenu($this->getName());
}
示例11: addToolbar
protected function addToolbar()
{
$canDo = DeviceHelper::getActions();
$bar = JToolBar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_DEVICE_MANAGER_DEVICES'), 'folder categories');
JToolbarHelper::addNew('device.add');
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('device.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('devices.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('devices.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('devices.archive');
JToolbarHelper::checkin('devices.checkin');
}
/*将信息直接删除
if($canDo->get('core.delete')){
JToolbarHelper::deleteList('', 'labs.delete', 'JTOOLBAR_DELETE');
}*/
$state = $this->get('State');
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'devices.delete', 'JTOOLBAR_EMPTY_TRASH');
} else {
if ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('devices.trash');
}
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_device');
}
JHtmlSidebar::setAction('index.php?option=com_device&view=devices');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
}
示例12: addToolbar
protected function addToolbar()
{
$canDo = JHelperContent::getActions($this->option, $this->edit_view, $this->state->get('filter.category_id'));
$user = JFactory::getUser();
JToolbarHelper::title(ucfirst($this->view), 'address contact');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories($this->option, 'core.create')) > 0) {
JToolbarHelper::addNew($this->edit_view . '.add');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolbarHelper::editList($this->edit_view . '.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish($this->view . '.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish($this->view . '.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($user->authorise('core.create', $this->option) && $user->authorise('core.edit', $this->option) && $user->authorise('core.edit.state', $this->option)) {
$title = JText::_('JTOOLBAR_BATCH');
$layout = new JLayoutFile('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', $this->view . '.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::deleteList($this->option, $this->view . '.delete', 'Delete');
}
if ($user->authorise('core.admin', $this->option) || $user->authorise('core.options', $this->option)) {
JToolbarHelper::preferences($this->option);
}
JHtmlSidebar::setAction('index.php?option=' . $this->option);
}
示例13: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('article.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('article.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
JToolbarHelper::archiveList('articles.archive');
JToolbarHelper::checkin('articles.checkin');
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('articles.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_content');
}
JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
JHtmlSidebar::setAction('index.php?option=com_content&view=featured');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
}
示例14: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/banners.php';
$canDo = JHelperContent::getActions('com_banners');
JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'bookmark banners-clients');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('client.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('client.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('clients.archive');
JToolbarHelper::checkin('clients.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('clients.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_banners');
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
}
示例15: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/banners.php';
$canDo = BannersHelper::getActions();
JToolbarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'banners-clients.png');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('client.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('client.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::archiveList('clients.archive');
JToolbarHelper::checkin('clients.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('clients.trash');
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_banners');
}
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
JHtmlSidebar::setAction('index.php?option=com_banners&view=clients');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true));
}