本文整理汇总了PHP中JToolbar类的典型用法代码示例。如果您正苦于以下问题:PHP JToolbar类的具体用法?PHP JToolbar怎么用?PHP JToolbar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JToolbar类的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: 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();
}
示例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'] = '';
}
示例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');
}
示例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')));
}
示例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');
}
示例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();
}
}
示例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');
}
示例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()
{
// 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');
}
示例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);
}
示例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');
}
示例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());
}
示例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'));
}
示例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'));
}