本文整理汇总了PHP中JToolbarHelper::addNewX方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::addNewX方法的具体用法?PHP JToolbarHelper::addNewX怎么用?PHP JToolbarHelper::addNewX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::addNewX方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($tpl = null)
{
global $context;
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_REDSHOP_ECONOMIC_ACCOUNT_GROUP'));
JToolBarHelper::title(JText::_('COM_REDSHOP_ECONOMIC_ACCOUNT_GROUP'), 'redshop_accountgroup48');
JToolbarHelper::addNewX();
JToolbarHelper::EditListX();
JToolbarHelper::deleteList();
JToolBarHelper::publishList();
JToolBarHelper::unpublishList();
$uri = JFactory::getURI();
$filter_order = $app->getUserStateFromRequest($context . 'filter_order', 'filter_order', 'accountgroup_id');
$filter_order_Dir = $app->getUserStateFromRequest($context . 'filter_order_Dir', 'filter_order_Dir', '');
$lists['order'] = $filter_order;
$lists['order_Dir'] = $filter_order_Dir;
$detail = $this->get('Data');
$total = $this->get('Total');
$pagination = $this->get('Pagination');
$this->pagination = $pagination;
$this->detail = $detail;
$this->lists = $lists;
$this->request_url = $uri->toString();
parent::display($tpl);
}
示例2: switch
* @since 2.1 - 01/10/2008
* @version 2.1
* @package jTips
*
* Description: Builds the toolbar for the Users module
*/
global $jLang;
switch (jTipsGetParam($_REQUEST, 'task', 'list')) {
case 'list':
jTipsMenuBar::startTable();
jTipsMenuBar::custom('clean', 'process', '../components/com_jtips/images/PROCESS.png', $jLang['_COM_ADMIN_CLEAN_USERS'], false);
jTipsMenuBar::spacer();
jTipsMenuBar::deleteListX($jLang['_ADMIN_CONFIRM_REMOVE']);
jTipsMenuBar::spacer();
if (isJoomla15()) {
JToolbarHelper::addNewX('edit');
} else {
jTipsMenuBar::addNewX('edit');
}
jTipsMenuBar::spacer();
jTipsMenuBar::endTable();
break;
case 'edit':
jTipsMenuBar::startTable();
jTipsMenuBar::spacer();
jTipsMenuBar::save('save');
jTipsMenuBar::spacer();
jTipsMenuBar::cancel('list');
jTipsMenuBar::spacer();
jTipsMenuBar::endTable();
break;
示例3: defined
* @subpackage {comName}
* @author {author}
* @copyright Copyright (C) {year}, . All rights reserved.
* @license GPL
*/
// ====================== példa, jelentősen átirandó ============================
// no direct access
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$session = JFactory::getSession();
// manipuláló gombok ha toolbar -t használunk
JToolbarHelper::tirle($this->title);
foreach ($this->buttons as $button) {
if (pos(buttontask, '.add') > 0) {
JToolbarHelper::addNewX($buttons[0], $button[2]);
} else {
if (pos(buttontask, '.edit') > 0) {
JToolbarHelper::editListX($buttons[0], $button[2]);
} else {
if (pos(buttontask, '.delete') > 0) {
JToolbarHelper::deleteListX('', $buttons[0], $button[2]);
} else {
if (pos(buttontask, '.save') > 0) {
JToolbarHelper::save($buttons[0], $button[2]);
} else {
if (pos(buttontask, '.cancel') > 0) {
JToolbarHelper::cancel($buttons[0], $button[2]);
} else {
if (pos(buttontask, '.back') > 0) {
JToolbarHelper::back($buttons[0], $button[2]);
示例4: onBrowse
/**
* Renders the toolbar for the component's Browse pages (the plural views)
*
* @return void
*/
public function onBrowse()
{
// On frontend, buttons must be added specifically
if (FOFPlatform::getInstance()->isBackend() || $this->renderFrontendSubmenu) {
$this->renderSubmenu();
}
if (!FOFPlatform::getInstance()->isBackend() && !$this->renderFrontendButtons) {
return;
}
// Set toolbar title
$option = $this->input->getCmd('option', 'com_foobar');
$subtitle_key = strtoupper($option . '_TITLE_' . $this->input->getCmd('view', 'cpanel'));
JToolbarHelper::title(JText::_(strtoupper($option)) . ': ' . JText::_($subtitle_key), str_replace('com_', '', $option));
// Add toolbar buttons
if ($this->perms->create) {
if (version_compare(JVERSION, '3.0', 'ge')) {
JToolbarHelper::addNew();
} else {
JToolbarHelper::addNewX();
}
}
if ($this->perms->edit) {
if (version_compare(JVERSION, '3.0', 'ge')) {
JToolbarHelper::editList();
} else {
JToolbarHelper::editListX();
}
}
if ($this->perms->create || $this->perms->edit) {
JToolbarHelper::divider();
}
if ($this->perms->editstate) {
JToolbarHelper::publishList();
JToolbarHelper::unpublishList();
JToolbarHelper::divider();
}
if ($this->perms->delete) {
$msg = JText::_($this->input->getCmd('option', 'com_foobar') . '_CONFIRM_DELETE');
JToolbarHelper::deleteList(strtoupper($msg));
}
}