本文整理汇总了PHP中JToolBarHelper::preferences方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::preferences方法的具体用法?PHP JToolBarHelper::preferences怎么用?PHP JToolBarHelper::preferences使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::preferences方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
} else {
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::trash('messages.trash');
}
}
//JToolBarHelper::addNew('module.add');
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400);
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_messages');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
示例2: _setToolbar
/**
* Setup the Toolbar.
*/
protected function _setToolbar()
{
$state = $this->get('State');
$canDo = TemplatesHelper::getActions();
$isSite = $state->get('filter.client_id') == 0;
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('style.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::custom('styles.sethome', 'default.png', 'default_f2.png', 'Templates_Toolbar_Set_Home', true);
}
JToolBarHelper::title(JText::_('Templates_Manager_Styles'), 'thememanager');
if ($canDo->get('core.create') && $isSite) {
JToolBarHelper::addNew('styles.duplicate', 'Templates_Toolbar_Save_Copy');
}
if ($canDo->get('core.delete') && $isSite) {
JToolBarHelper::deleteList('', 'styles.delete');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_templates');
}
JToolBarHelper::divider();
JToolBarHelper::help('screen.templates');
}
示例3: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('user.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('user.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
JToolBarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
JToolBarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
JToolBarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'users.delete');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_users');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
}
示例4: 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, 500);
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_FINDER_MANAGE_SEARCH_FILTERS');
}
示例5: addToolBar
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JToolBarHelper::addNew('portfolio.add');
JToolBarHelper::editList('portfolio.edit');
JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false);
JToolBarHelper::divider();
JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png');
JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('portfolios.checkin');
JToolBarHelper::deleteList('', 'portfolios.delete');
JToolBarHelper::preferences('com_bt_portfolio');
$this->sidebar = '';
Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
//added since 2.0 for j3.0
if (!$this->legacy) {
JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')));
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_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
$this->sidebar = JHtmlSidebar::render();
}
}
示例6: _setToolBar
/**
* Установки тулбара
*/
protected function _setToolBar()
{
require_once JPATH_COMPONENT . '/helpers/smfaq.php';
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
SmFaqHelper::addSubmenu($this->_name);
$canDo = SmFaqHelper::getActions($this->state->get('filter.category_id'));
// Выводим нужные кнопки и заголовок
JToolBarHelper::title(JText::_('COM_SMFAQ_MANAGER_QUESTIONS'), 'smfaq');
if ($canDo->get('core.create')) {
JToolBarHelper::addNewX('smfaq.add', 'JTOOLBAR_NEW');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editListX('smfaq.edit', 'JTOOLBAR_EDIT');
}
JToolBarHelper::divider();
JToolBarHelper::custom('smfaqlist.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::custom('smfaqlist.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('smfaqlist.checkin');
// Замена тулбара карзины на удаление
if ($this->state->get('filter.published') == -2) {
JToolBarHelper::deleteList('COM_SMFAQ_YOU_WANT_DELETE_THIS', 'smfaqlist.delete', 'JTOOLBAR_EMPTY_TRASH');
} else {
JToolBarHelper::trash('smfaqlist.trash', 'JTOOLBAR_TRASH');
}
JToolBarHelper::divider();
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_smfaq');
}
}
示例7: addToolbar
protected function addToolbar()
{
JToolBarHelper::title(JText::_('COM_JDEVELOPER_OVERRIDES'));
JToolBarHelper::editList('template.edit', 'JTOOLBAR_EDIT');
JToolBarHelper::deleteList('', 'overrides.delete', 'JTOOLBAR_DELETE');
JToolBarHelper::preferences('com_jdeveloper');
}
示例8: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/sibdiet.php';
$state = $this->get('State');
$canDo = SibdietHelper::getActions();
// Get the toolbar object instance
$bar = JToolBar::getInstance('toolbar');
JToolBarHelper::title(JText::_('COM_SIBDIET_MANAGER_ACTIVITIES'), 'database activities');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('activity.add');
}
if ($canDo->get('core.edit') && isset($this->items[0])) {
JToolBarHelper::editList('activity.edit');
}
if ($canDo->get('core.edit.state')) {
JToolbarHelper::checkin('activities.checkin');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolbarHelper::publish('activities.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::deleteList('', 'activities.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolbarHelper::trash('activities.trash');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_sibdiet');
}
JHtmlSidebar::setAction('index.php?option=com_sibdiet&view=activities');
}
示例9: display
function display($tpl = null)
{
$canDo = CoalawebcontactHelper::getActions();
$model = $this->getModel();
if (version_compare(JVERSION, '3.0', '>')) {
CoalawebcontactHelper::addSubmenu('controlpanel');
}
// Is this the Professional release?
jimport('joomla.filesystem.file');
$isPro = COM_CWCONTACT_PRO == 1;
$this->assign('isPro', $isPro);
$version = COM_CWCONTACT_VERSION;
$this->assign('version', $version);
$releaseDate = COM_CWCONTACT_DATE;
$this->assign('release_date', $releaseDate);
$needsDlid = $model->needsDownloadID();
$this->assign('needsdlid', $needsDlid);
if (COM_CWCONTACT_PRO == 1) {
JToolBarHelper::title(JText::_('COM_CWCONTACT_TITLE_PRO') . ' [ ' . JText::_('COM_CWCONTACT_TITLE_CPANEL') . ' ]', 'cw-cpanel');
} else {
JToolBarHelper::title(JText::_('COM_CWCONTACT_TITLE_CORE') . ' [ ' . JText::_('COM_CWCONTACT_TITLE_CPANEL') . ' ]', 'cw-cpanel');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_coalawebcontact');
}
$help_url = 'http://coalaweb.com/support-menu/documentation/item/coalaweb-contact-guide';
JToolBarHelper::help('COM_CWCONTACT_TITLE_HELP', false, $help_url);
parent::display($tpl);
}
示例10: 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::divider();
JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::archiveList('articles.archive');
JToolBarHelper::checkin('articles.checkin');
JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::trash('articles.trash');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_content');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
}
示例11: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/languages.php';
$canDo = LanguagesHelper::getActions();
JToolBarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
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');
}
示例12: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*/
protected function addToolbar()
{
$canDo = TagnyilvantartasHelper::getActions();
$user = JFactory::getUser();
JToolBarHelper::title( JText::_( 'Felhcsoportok' ), 'generic.png' );
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('felhcsoportok.add');
}
if (($canDo->get('core.edit')))
{
JToolBarHelper::editList('felhcsoportok.edit');
}
if ($canDo->get('core.delete'))
{
JToolbarHelper::deleteList('', 'felhcsoportoks.delete', 'JTOOLBAR_EMPTY_TRASH');
}
JToolBarHelper::preferences('com_tagnyilvantartas', '550');
if(!version_compare(JVERSION,'3','<')){
JHtmlSidebar::setAction('index.php?option=com_tagnyilvantartas&view=felhcsoportoks');
}
}
示例13: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/contact.php';
$canDo = ContactHelper::getActions($this->state->get('filter.category_id'));
$user = JFactory::getUser();
JToolBarHelper::title(JText::_('COM_CONTACT_MANAGER_CONTACTS'), 'contact.png');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_contact', 'core.create')) > 0) {
JToolBarHelper::addNew('contact.add', 'JTOOLBAR_NEW');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolBarHelper::editList('contact.edit', 'JTOOLBAR_EDIT');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::custom('contacts.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::custom('contacts.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::archiveList('contacts.archive', 'JTOOLBAR_ARCHIVE');
JToolBarHelper::custom('contacts.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'contacts.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} else {
if ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('contacts.trash', 'JTOOLBAR_TRASH');
JToolBarHelper::divider();
}
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_contact');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_COMPONENTS_CONTACTS_CONTACTS');
}
示例14: setToolbar
function setToolbar()
{
switch ($this->_task) {
default:
JToolBarHelper::title(JText::_('Tags Manager'));
JToolBarHelper::editList();
JToolBarHelper::divider();
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
JToolBarHelper::divider();
JToolBarHelper::deleteList(JText::_('COM_TZ_PINBOARD_QUESTION_DELETE'));
JToolBarHelper::preferences('com_tz_pinboard');
break;
case 'add':
case 'new':
JRequest::setVar('hidemainmenu', true);
JToolBarHelper::title(JText::_('Tags Manager: <small><small>' . JText::_(ucfirst($this->_task)) . '</small></small>'));
JToolBarHelper::save2new();
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
break;
case 'edit':
JRequest::setVar('hidemainmenu', true);
JToolBarHelper::title(JText::_('Tags Manager: <small><small>' . JText::_(ucfirst(JRequest::getCmd('task'))) . '</small></small>'));
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel('cancel', JText::_('JTOOLBAR_CLOSE'));
break;
}
$state = array('P' => JText::_('JPUBLISHED'), 'U' => JText::_('JUNPUBLISHED'));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', $state, 'value', 'text', $this->state->filter_state));
}
示例15: display
function display($tpl = null)
{
JToolBarHelper::title(JText::_('OTRS_GATEWAY'), '');
JToolBarHelper::preferences('com_otrsgateway', '350');
$document =& JFactory::getDocument();
$document->setTitle(JText::_('OTRS_GATEWAY'));
// Work out the current status of the module
$summary = array(JText::_('OTRS_UNCONFIGURED'));
$config =& JComponentHelper::getParams('com_otrsgateway');
if (class_exists('SoapClient')) {
if ($config->get('otrsgateway_rpc_url') && $config->get('otrsgateway_rpc_user') && $config->get('otrsgateway_rpc_password')) {
$summary = array();
$result = null;
$vars = array('SystemID' => array(false, XSD_BOOLEAN));
$gateway = new OTRSGatewayRPCHelper();
if ($err = $gateway->callOTRS('TimeObject', 'CurrentTimestamp', $vars, $result)) {
$summary[] = $err;
} else {
if ($result) {
$summary[] = JText::_('OTRS_CONNECTED');
} else {
$summary[] = JText::_('OTRS_GATEWAY_AUTH');
}
if (!function_exists('json_encode')) {
$summary[] = JText::_('OTRS_GATEWAY_NEED_JSON');
}
}
}
} else {
$summary[] = JText::_('OTRS_NO_SOAP');
}
$this->assignRef('summary', $summary);
parent::display($tpl);
}