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


PHP LanguagesHelper::getActions方法代码示例

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


在下文中一共展示了LanguagesHelper::getActions方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

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

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     Request::setVar('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = LanguagesHelper::getActions();
     Toolbar::title(Lang::txt($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         Toolbar::save('language.save');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('language.apply');
         Toolbar::save('language.save');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         Toolbar::save2new('language.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('language.cancel');
     } else {
         Toolbar::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('language');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:33,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since  1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     JFactory::getApplication()->input->set('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = LanguagesHelper::getActions();
     JToolbarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         JToolbarHelper::save('language.save');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         JToolbarHelper::apply('language.apply');
         JToolbarHelper::save('language.save');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         JToolbarHelper::save2new('language.save2new');
     }
     if ($isNew) {
         JToolbarHelper::cancel('language.cancel');
     } else {
         JToolbarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
     $this->sidebar = JHtmlSidebar::render();
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:34,代码来源:view.html.php

示例4: 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')) {
         // Add install languages link to the lang installer component
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Link', 'extension', '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');
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:40,代码来源:view.html.php

示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/languages.php';
     JRequest::setVar('hidemainmenu', 1);
     $isNew = empty($this->item->lang_id);
     $canDo = LanguagesHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_NEW_TITLE' : 'COM_LANGUAGES_VIEW_LANGUAGE_EDIT_EDIT_TITLE'), 'langmanager.png');
     // If a new item, can save.
     if ($isNew && $canDo->get('core.create')) {
         JToolBarHelper::save('language.save', 'JTOOLBAR_SAVE');
     }
     //If an existing item, allow to Apply and Save.
     if (!$isNew && $canDo->get('core.edit')) {
         JToolBarHelper::apply('language.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('language.save', 'JTOOLBAR_SAVE');
     }
     // If an existing item, can save to a copy only if we have create rights.
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('language.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     if ($isNew) {
         JToolBarHelper::cancel('language.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('language.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_EDIT');
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:33,代码来源:view.html.php

示例6: 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_INSTALLED_TITLE'), 'langmanager.png');
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::makeDefault('installed.setDefault');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_languages');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_INSTALLED');
 }
开发者ID:Nechoj23,项目名称:SVI-Homepage,代码行数:20,代码来源:view.html.php

示例7: addToolbar

 /**
  * Adds the page title and toolbar
  *
  * @return void
  *
  * @since	2.5
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $canDo = LanguagesHelper::getActions();
     JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_OVERRIDE_EDIT_TITLE'), 'comments-2 langmanager');
     if ($canDo->get('core.edit')) {
         JToolbarHelper::apply('override.apply');
         JToolbarHelper::save('override.save');
     }
     // This component does not support Save as Copy
     if ($canDo->get('core.edit') && $canDo->get('core.create')) {
         JToolbarHelper::save2new('override.save2new');
     }
     if (empty($this->item->key)) {
         JToolbarHelper::cancel('override.cancel');
     } else {
         JToolbarHelper::cancel('override.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_OVERRIDES_EDIT');
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:28,代码来源:view.html.php

示例8: 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')) {
         // 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');
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
 }
开发者ID:RuDers,项目名称:JoomlaSQL,代码行数:43,代码来源:view.html.php

示例9: defined

<?php

/**
 * @package		Joomla.Administrator
 * @subpackage	com_languages
 * @copyright	Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_HZEXEC_') or die;
Html::addIncludePath(JPATH_COMPONENT . '/helpers/html');
Html::behavior('tooltip');
Html::behavior('formvalidation');
$canDo = LanguagesHelper::getActions();
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'language.cancel' || document.formvalidator.isValid($('#item-form'))) {
			Joomla.submitform(task, document.getElementById('item-form'));
		}
	}
</script>

<form action="<?php 
echo Route::url('index.php?option=com_languages&layout=edit&lang_id=' . (int) $this->item->lang_id);
?>
" method="post" name="adminForm" id="item-form" class="form-validate">
	<div class="grid">
		<div class="col span7">
			<fieldset class="adminform">
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:edit.php


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