本文整理汇总了PHP中JToolbar类的典型用法代码示例。如果您正苦于以下问题:PHP JToolbar类的具体用法?PHP JToolbar怎么用?PHP JToolbar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JToolbar类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: 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
示例3: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @return void
*
* @since 3.0
*/
protected function setUp()
{
$this->toolbar = JToolbar::getInstance();
$this->object = $this->toolbar->loadButtonType('confirm');
$this->saveFactoryState();
JFactory::$application = $this->getMockCmsApp();
$this->backupServer = $_SERVER;
$_SERVER['HTTP_HOST'] = 'example.com';
$_SERVER['SCRIPT_NAME'] = '';
}
开发者ID:SysBind,项目名称:joomla-cms,代码行数:18,代码来源:JToolbarButtonConfirmTest.php
示例4: 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
示例5: 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
示例6: 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> ' . JText::_('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER') . '</a>';
$bar->appendButton('Custom', $return, 'manager');
}
开发者ID:templaza,项目名称:tz_portfolio_plus,代码行数:7,代码来源:view.html.php
示例7: 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
示例8: 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
示例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')));
}
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:36,代码来源:view.html.php
示例10: 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
示例11: __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
示例12: 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
示例13: 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
示例14: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*/
protected function addToolbar()
{
JToolBarHelper::editList('passenger.edit');
JToolbarHelper::deleteList('', 'passengers.delete', 'JTOOLBAR_TRASH');
JToolBarHelper::custom('passengers.exportpdf', 'download', 'icon over', JText::_('Export PDF'), false, false);
$toolbar = JToolbar::getInstance('toolbar');
$toolbar->appendButton('Link', 'print', JText::_('COM_BOOKPRO_PRINT'), JUri::base() . 'index.php?option=com_bookpro&view=passengers&tmpl=component&layout=report');
JToolBarHelper::title(JText::_('COM_BOOPRO_MANAGER_PASSENGERS'));
}
开发者ID:hixbotay,项目名称:executivetransport,代码行数:14,代码来源: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
示例16: addToolbar
/**
* Add the toolbar and toolbar title.
*
* @return void
* @since 2.0
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/includes/popup.php';
JToolBarHelper::title(JText::_('COM_JOOMGALLERY_CONFIGS_CONFIGURATION_MANAGER'), 'equalizer');
$toolbar = JToolbar::getInstance('toolbar');
$toolbar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=' . _JOOM_OPTION . '&controller=config&layout=new&tmpl=component', 400, 350, 0, 0, '', 'COM_JOOMGALLERY_CONFIGS_NEW_HEADING', 'jg-new-popup', 'new');
JToolbarHelper::editList('edit');
JToolbarHelper::deleteList('', 'remove');
}
开发者ID:pabloarias,项目名称:JoomGallery,代码行数:15,代码来源:view.html.php
示例17: 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
示例18: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_("COM_CROWDFUNDINGFINANCE_DASHBOARD"));
JToolbarHelper::preferences('com_crowdfundingfinance');
JToolbarHelper::divider();
// Help button
$bar = JToolbar::getInstance('toolbar');
$bar->appendButton('Link', 'help', JText::_('JHELP'), JText::_('COM_CROWDFUNDINGFINANCE_HELP_URL'));
}
开发者ID:pashakiz,项目名称:crowdf,代码行数:14,代码来源:view.html.php
示例19: modal
/**
* Set a modal button.
*/
public static function modal($title = 'JTOOLBAR_BATCH', $selector = 'myModal', $icon = 'checkbox-partial')
{
AKHelper::_('ui.modal', $selector);
$bar = JToolbar::getInstance('toolbar');
$title = JText::_($title);
$option = array('class' => 'btn btn-small ' . $selector . '-link', 'icon' => JVERSION >= 3 ? 'icon-' . $icon : $icon);
$dhtml = AKHelper::_('ui.modalLink', $title, $selector, $option);
$bar->appendButton('Custom', $dhtml, 'batch');
}
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:12,代码来源:toolbar.php
示例20: customButton
public static function customButton($text, $class, $id, $link)
{
$bar = JToolbar::getInstance('toolbar');
$html = "<a href=\"{$link}\" class=\"toolbar\">\n";
$html .= "<span class=\"{$class}\" title=\"{$text}\">\n";
$html .= "</span>\n";
$html .= "{$text}\n";
$html .= "</a>\n";
$bar->appendButton('Custom', $html, $id);
}
开发者ID:andergmartins,项目名称:OSToolbar,代码行数:10,代码来源:helper.php
注:本文中的JToolbar类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论