当前位置: 首页>>代码示例>>PHP>>正文


PHP JToolbar::getInstance方法代码示例

本文整理汇总了PHP中JToolbar::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbar::getInstance方法的具体用法?PHP JToolbar::getInstance怎么用?PHP JToolbar::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JToolbar的用法示例。


在下文中一共展示了JToolbar::getInstance方法的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')));
 }
开发者ID:educakanchay,项目名称:educared,代码行数:32,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     // Get the toolbar object instance
     $bar = JToolbar::getInstance('toolbar');
     $user = JFactory::getUser();
     // Set the titlebar text
     JToolbarHelper::title(JText::_('COM_MEDIA'), 'images mediamanager');
     // Add an upload button
     if ($user->authorise('core.create', 'com_media')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.uploadmedia');
         $bar->appendButton('Custom', $layout->render(array()), 'upload');
         JToolbarHelper::divider();
     }
     // Add a create folder button
     if ($user->authorise('core.create', 'com_media')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.newfolder');
         $bar->appendButton('Custom', $layout->render(array()), 'upload');
         JToolbarHelper::divider();
     }
     // Add a delete button
     if ($user->authorise('core.delete', 'com_media')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.deletemedia');
         $bar->appendButton('Custom', $layout->render(array()), 'upload');
         JToolbarHelper::divider();
     }
     // Add a preferences button
     if ($user->authorise('core.admin', 'com_media') || $user->authorise('core.options', 'com_media')) {
         JToolbarHelper::preferences('com_media');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_CONTENT_MEDIA_MANAGER');
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:42,代码来源:view.html.php

示例3: 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');
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:42,代码来源:view.html.php

示例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, 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')));
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:36,代码来源:view.html.php

示例5: addToolbar

 protected function addToolbar()
 {
     JToolBarHelper::title(JText::sprintf('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER_TASK', 'Manager Data'), 'puzzle');
     $bar = JToolbar::getInstance();
     $return = '<a class="btn btn-small" href="' . JRoute::_('index.php?option=com_tz_portfolio_plus&view=addons') . '">' . '<span class="icon-puzzle"></span>&nbsp;' . JText::_('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER') . '</a>';
     $bar->appendButton('Custom', $return, 'manager');
 }
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:7,代码来源:view.html.php

示例6: display

 /**
  * Execute and display a template script.
  *
  * @param   string $tpl The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  *
  * @since   3.6
  */
 public function display($tpl = null)
 {
     $this->user = JFactory::getUser();
     $this->bar = JToolbar::getInstance('toolbar');
     $ftp = !JClientHelper::hasCredentials('ftp');
     $images = $this->get('images');
     $subfolders = $this->get('folders');
     $folders = $this->getModel()->getFolders(COM_MEDIA_BASE);
     $currentFolder = $this->getModel()->getCurrentFolder();
     $state = $this->get('state');
     $this->session = JFactory::getSession();
     $this->config = JComponentHelper::getParams('com_media');
     $this->state = $this->get('state');
     $this->require_ftp = $ftp;
     $this->images = $images;
     $this->folders = $folders;
     $this->current_folder = $currentFolder;
     $this->subfolders = $subfolders;
     $this->state = $state;
     if ($this->state->folder === "") {
         $this->state->folder = COM_MEDIA_BASEURL;
     }
     // Set the toolbar
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:35,代码来源:view.html.php

示例7: __construct

 public function __construct($config = array())
 {
     $document = JFactory::getDocument();
     //load dialog stylesheet in backend
     KomentoDocumentHelper::loadHeaders();
     $config = Komento::getConfig();
     $konfig = Komento::getKonfig();
     $toolbar = JToolbar::getInstance('toolbar');
     $toolbar->addButtonPath(KOMENTO_ADMIN_ROOT . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR . 'images');
     if ($document->getType() == 'html') {
         require_once KOMENTO_CLASSES . DIRECTORY_SEPARATOR . 'configuration.php';
         $configuration = KomentoConfiguration::getInstance();
         $configuration->attach();
     }
     $version = str_ireplace('.', '', Komento::komentoVersion());
     $document->addScript(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/js/admin.js?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/reset.css?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/components/com_komento/assets/css/common.css?' . $version);
     $document->addStyleSheet(rtrim(JURI::root(), '/') . '/administrator/components/com_komento/assets/css/style.css?' . $version);
     // For the sake of loading the core.js in Joomla 1.6 (1.6.2 onwards)
     if (Komento::joomlaVersion() >= '1.6') {
         JHTML::_('behavior.framework');
     }
     parent::__construct($config);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:25,代码来源:controller.php

示例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')));
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:32,代码来源:view.html.php

示例9: 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();
     }
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:34,代码来源:view.html.php

示例10: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_messages');
     JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'envelope inbox');
     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', true);
         JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD', true);
     }
     JToolbarHelper::divider();
     $bar = JToolbar::getInstance('toolbar');
     // Instantiate a new JLayoutFile instance and render the layout
     JHtml::_('behavior.modal', 'a.messagesSettings');
     $layout = new JLayoutFile('toolbar.mysettings');
     $bar->appendButton('Custom', $layout->render(array()), 'upload');
     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');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_messages');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
 }
开发者ID:naumangla,项目名称:joomla-cms,代码行数:39,代码来源:view.html.php

示例11: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.1
  */
 protected function setUp()
 {
     $this->toolbar = JToolbar::getInstance();
     $this->object = $this->toolbar->loadButtonType('link');
     $this->saveFactoryState();
     JFactory::$application = $this->getMockApplication();
 }
开发者ID:karimzg,项目名称:joomla,代码行数:15,代码来源:JToolbarButtonLinkTest.php

示例12: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return void
  *
  * @since    1.6
  */
 protected function addToolbar()
 {
     // Set sidebar action - New in 3.0
     JHtmlSidebar::setAction('index.php?option=com_neno&view=strings');
     $toolbar = JToolbar::getInstance();
     $toolbar->addButtonPath(JPATH_NENO . '/button');
     $toolbar->appendButton('TC', NenoHelperApi::getTCAvailable());
 }
开发者ID:andresmaeso,项目名称:neno,代码行数:15,代码来源:view.html.php

示例13: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   2.0
  */
 protected function addToolbar()
 {
     \JToolBarHelper::title(\JText::_('COM_PATCHTESTER'), 'patchtester icon-apply');
     if (!count($this->envErrors)) {
         \JToolbar::getInstance('toolbar')->appendButton('Popup', 'refresh', 'COM_PATCHTESTER_TOOLBAR_FETCH_DATA', 'index.php?option=com_patchtester&view=fetch&tmpl=component', 500, 210, 0, 0, 'window.parent.location.reload()', 'COM_PATCHTESTER_HEADING_FETCH_DATA');
     }
     \JToolBarHelper::preferences('com_patchtester');
 }
开发者ID:photodude,项目名称:patchtester,代码行数:15,代码来源:PullsHtmlView.php

示例14: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return void
  *
  * @since    1.6
  */
 protected function addToolbar()
 {
     JToolbarHelper::addNew('addGroup', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_ADD_GROUP'));
     JToolbarHelper::custom('moveelementconfirm.show', 'move', 'move', JText::_('COM_NENO_VIEW_GROUPSELEMENTS_BTN_MOVE_ELEMENTS'), true);
     $toolbar = JToolbar::getInstance();
     $toolbar->addButtonPath(JPATH_NENO . '/button');
     $toolbar->appendButton('TC', NenoHelperApi::getTCAvailable());
     $this->extraSidebar = NenoHelperBackend::getSidebarInfobox('groupselements');
 }
开发者ID:javigomez,项目名称:neno,代码行数:16,代码来源:view.html.php

示例15: addToolbar

 private function addToolbar()
 {
     $text = JText::_('Edit') . ' ' . $this->item->file;
     $bar = JToolbar::getInstance('toolbar');
     JToolbarHelper::title(JText::_('COM_EVENTGALLERY_FILES') . ': <small>[ ' . $text . ' ]</small>');
     JToolbarHelper::apply('file.apply');
     JToolbarHelper::save('file.save');
     JToolbarHelper::cancel('file.cancel', JText::_('JTOOLBAR_CLOSE'));
 }
开发者ID:sansandeep143,项目名称:av,代码行数:9,代码来源:view.html.php


注:本文中的JToolbar::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。