本文整理汇总了PHP中JToolbarHelper::publishList方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::publishList方法的具体用法?PHP JToolbarHelper::publishList怎么用?PHP JToolbarHelper::publishList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::publishList方法的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: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('language.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('language.edit');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.published') != 2) {
JToolbarHelper::publishList('languages.publish');
JToolbarHelper::unpublishList('languages.unpublish');
}
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolbarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('languages.trash');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_languages');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
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_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
}
示例3: registerToolbar
public function registerToolbar()
{
$layout = JRequest::getVar('layout');
JToolBarHelper::title(JText::_('COM_EASYBLOG_BLOCKS_TITLE'), 'blocks');
JToolbarHelper::publishList('blocks.publish');
JToolbarHelper::unpublishList('blocks.unpublish');
}
示例4: addToolbar
/**
* Add the toolbar and toolbar title.
*
* @access protected
* @return void
*
* @since 2.0
*/
protected function addToolbar()
{
// Get the results for each action
$canDo = JoomHelper::getActions();
JToolBarHelper::title(JText::_('COM_JOOMGALLERY_CATMAN_CATEGORY_MANAGER'), 'folder');
if ($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.create') || count(JoomHelper::getAuthorisedCategories('core.create'))) {
JToolbarHelper::addNew('new');
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.edit') || count(JoomHelper::getAuthorisedCategories('core.edit'))) && $this->pagination->total) {
JToolbarHelper::editList('edit');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n <i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n {$title}</button>";
JToolBar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch');
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || count(JoomHelper::getAuthorisedCategories('core.edit.state'))) && $this->pagination->total) {
JToolbarHelper::publishList('publish', JText::_('COM_JOOMGALLERY_COMMON_PUBLISH'));
JToolbarHelper::unpublishList('unpublish', JText::_('COM_JOOMGALLERY_COMMON_UNPUBLISH'));
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.delete') || count(JoomHelper::getAuthorisedCategories('core.delete'))) && $this->pagination->total) {
JToolbarHelper::deleteList('', 'remove');
JToolbarHelper::divider();
}
}
示例5: addToolbar
/**
* Add the toolbar and toolbar title.
*
* @access protected
* @return void
*
* @since 2.0
*/
protected function addToolbar()
{
// Get the results for each action
$canDo = JoomHelper::getActions();
JToolBarHelper::title(JText::_('COM_JOOMGALLERY_CATMAN_CATEGORY_MANAGER'), 'folder');
if ($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.create') || count(JoomHelper::getAuthorisedCategories('core.create'))) {
JToolbarHelper::addNew('new');
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.edit') || count(JoomHelper::getAuthorisedCategories('core.edit'))) && $this->pagination->total) {
JToolbarHelper::editList('edit');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');
$dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n <i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n {$title}</button>";
JToolBar::getInstance('toolbar')->appendButton('Custom', $dhtml, 'batch');
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || count(JoomHelper::getAuthorisedCategories('core.edit.state'))) && $this->pagination->total) {
JToolbarHelper::publishList('publish', JText::_('COM_JOOMGALLERY_COMMON_PUBLISH'));
JToolbarHelper::unpublishList('unpublish', JText::_('COM_JOOMGALLERY_COMMON_UNPUBLISH'));
JToolbarHelper::divider();
}
if (($this->_config->get('jg_disableunrequiredchecks') || $canDo->get('core.delete') || count(JoomHelper::getAuthorisedCategories('core.delete'))) && $this->pagination->total) {
JToolbarHelper::deleteList('', 'remove');
JToolbarHelper::divider();
}
$options = array(JHtml::_('select.option', 1, JText::_('COM_JOOMGALLERY_COMMON_OPTION_PUBLISHED_ONLY')), JHtml::_('select.option', 0, JText::_('COM_JOOMGALLERY_COMMON_OPTION_NOT_PUBLISHED_ONLY')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
$options = array(JHtml::_('select.option', 1, JText::_('COM_JOOMGALLERY_CATMAN_OPTION_USERCATEGORIES_ONLY')), JHtml::_('select.option', 2, JText::_('COM_JOOMGALLERY_CATMAN_OPTION_BACKENDCATEGORIES_ONLY')));
JHtmlSidebar::addFilter(JText::_('COM_JOOMGALLERY_COMMON_OPTION_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', $options, 'value', 'text', $this->state->get('filter.type'), true));
}
示例6: 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_FILTERS_TOOLBAR_TITLE'), 'zoom-in finder');
$toolbar = JToolbar::getInstance('toolbar');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('filter.add');
JToolbarHelper::editList('filter.edit');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publishList('filters.publish');
JToolbarHelper::unpublishList('filters.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_SEARCH_FILTERS');
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'filters.delete');
JToolbarHelper::divider();
}
}
示例7: 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')));
}
示例8: display
/**
* Default access rules listing page.
*
* @author Jason Rey <jasonrey@stackideas.com>
* @since 1.2
* @access public
* @param string $tpl The template to load
*/
public function display($tpl = null)
{
$this->setHeading('COM_EASYSOCIAL_HEADING_ACCESS');
$this->setDescription('COM_EASYSOCIAL_DESCRIPTION_ACCESS');
// Add Joomla buttons here
JToolbarHelper::publishList();
JToolbarHelper::unpublishList();
JToolbarHelper::divider();
JToolbarHelper::deleteList();
$model = FD::model('accessrules', array('initState' => true));
$state = $model->getState('published');
$extension = $model->getState('filter');
$limit = $model->getState('limit');
$ordering = $model->getState('ordering');
$direction = $model->getState('direction');
$search = $model->getState('search');
$access = $model->getItems();
// Load a list of extensions so that users can filter them.
$extensions = $model->getExtensions();
// Get pagination
$pagination = $model->getPagination();
$this->set('access', $access);
$this->set('ordering', $ordering);
$this->set('direction', $direction);
$this->set('limit', $limit);
$this->set('selectedExtension', $extension);
$this->set('search', $search);
$this->set('pagination', $pagination);
$this->set('extensions', $extensions);
$this->set('extension', $extension);
$this->set('state', $state);
echo parent::display('admin/access/default');
}
示例9: 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_FILTERS_TOOLBAR_TITLE'), 'finder');
$toolbar = JToolbar::getInstance('toolbar');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('filter.add');
JToolbarHelper::editList('filter.edit');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::publishList('filters.publish');
JToolbarHelper::unpublishList('filters.unpublish');
JToolbarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolbarHelper::deleteList('', 'filters.delete');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolbarHelper::preferences('com_finder');
}
JToolbarHelper::divider();
$toolbar->appendButton('Popup', 'stats', 'COM_FINDER_STATISTICS', 'index.php?option=com_finder&view=statistics&tmpl=component', 550, 350);
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
JHtmlSidebar::setAction('index.php?option=com_finder&view=filters');
JHtmlSidebar::addFilter(JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), 'filter_state', JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')));
}
示例10: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_languages');
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'comments-2 langmanager');
if ($canDo->get('core.create')) {
JToolbarHelper::addNew('language.add');
}
if ($canDo->get('core.edit')) {
JToolbarHelper::editList('language.edit');
JToolbarHelper::divider();
}
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.published') != 2) {
JToolbarHelper::publishList('languages.publish');
JToolbarHelper::unpublishList('languages.unpublish');
}
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolbarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('languages.trash');
JToolbarHelper::divider();
}
if ($canDo->get('core.admin')) {
// Add install languages link to the lang installer component.
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Link', 'upload', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
JToolbarHelper::divider();
JToolbarHelper::preferences('com_languages');
JToolbarHelper::divider();
}
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
}
示例11: registerToolbar
public function registerToolbar()
{
JToolBarHelper::title(JText::_('COM_EASYDISCUSS_REPORTS'), 'reports');
JToolBarHelper::custom('home', 'arrow-left', '', JText::_('COM_EASYDISCUSS_TOOLBAR_HOME'), false);
JToolBarHelper::divider();
JToolbarHelper::publishList();
JToolbarHelper::unpublishList();
}
示例12: addToolbar
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_EVENTGALLERY_WATERMARKS'), 'generic.png');
JToolbarHelper::addNew('watermark.add');
JToolbarHelper::editList('watermark.edit');
JToolbarHelper::publishList('watermarks.publish');
JToolbarHelper::unpublishList('watermarks.unpublish');
JToolbarHelper::deleteList('Remove all selected Events?', 'watermarks.delete', 'Remove');
}
示例13: registerToolbar
function registerToolbar()
{
JToolBarHelper::title(JText::_('COM_EASYBLOG_PENDING_PAGE_TITLE'), 'pending');
JToolbarHelper::back(JText::_('COM_EASYBLOG_TOOLBAR_HOME'), 'index.php?option=com_easyblog');
JToolBarHelper::divider();
JToolbarHelper::publishList('approve', JText::_('COM_EASYBLOG_APPROVE_BUTTON'));
JToolbarHelper::unpublishList('reject', JText::_('COM_EASYBLOG_REJECT_BUTTON'));
JToolBarHelper::divider();
JToolbarHelper::deleteList();
}
示例14: registerToolbar
function registerToolbar()
{
JToolBarHelper::title(JText::_('COM_KOMENTO_PENDING'), 'pending');
JToolBarHelper::back(JText::_('COM_KOMENTO_ADMIN_HOME'), 'index.php?option=com_komento');
JToolBarHelper::divider();
JToolbarHelper::publishList();
JToolbarHelper::unpublishList();
JToolBarHelper::divider();
JToolbarHelper::deleteList();
}
示例15: state
public function state($tpl = null)
{
// Check access
if (!$this->authorise('easysocial.access.regions')) {
$this->redirect('index.php', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
}
$parentuid = $this->input->get('parent', 0, 'int');
$parent = FD::table('Region');
$result = $parent->load(array('uid' => $parentuid, 'type' => SOCIAL_REGION_TYPE_COUNTRY));
if (!$result) {
$this->setHeading(JText::_('COM_EASYSOCIAL_REGIONS_STATES_TITLE'));
$this->setDescription(JText::_('COM_EASYSOCIAL_REGIONS_STATES_DESCRIPTION'));
} else {
$this->setHeading(JText::sprintf('COM_EASYSOCIAL_REGIONS_STATES_OF_COUNTRY_TITLE', $parent->name));
$this->setDescription(JText::sprintf('COM_EASYSOCIAL_REGIONS_STATES_OF_COUNTRY_DESCRIPTION', $parent->name));
}
$this->setIcon('ies-earth');
JToolbarHelper::addNew('form', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_NEW'), false);
JToolbarHelper::publishList('publish');
JToolbarHelper::unpublishList('unpublish');
JToolbarHelper::divider();
JToolbarHelper::deleteList('', 'delete', JText::_('COM_EASYSOCIAL_TOOLBAR_TITLE_BUTTON_DELETE'));
JToolbarHelper::divider();
JToolbarHelper::custom('init', 'refresh', '', JText::_('COM_EASYSOCIAL_REGIONS_INITIALISE_DATABASE'), false);
$model = FD::model('Regions', array('initState' => true));
$itemOptions = array('type' => SOCIAL_REGION_TYPE_STATE);
if ($result && $parent->uid) {
$itemOptions['parent_uid'] = $parent->uid;
$itemOptions['parent_type'] = SOCIAL_REGION_TYPE_COUNTRY;
}
$regions = $model->getItems($itemOptions);
$pagination = $model->getPagination();
$this->set('regions', $regions);
$this->set('parent', $parent);
$this->set('pagination', $pagination);
$search = $model->getState('search');
$ordering = $model->getState('ordering');
$direction = $model->getState('direction');
$state = $model->getState('state');
$type = $model->getState('type');
$limit = $model->getState('limit');
$this->set('search', $search);
$this->set('ordering', $ordering);
$this->set('direction', $direction);
$this->set('state', $state);
$this->set('type', $type);
$this->set('limit', $limit);
$this->set('layout', $this->input->get('layout', '', 'string'));
// Mark this as false for now. In the future when cities are ready then mark this as true
$this->set('childType', false);
$this->set('showOrdering', !empty($parent->id));
echo parent::display('admin/regions/default');
}