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


PHP Toolbar::save方法代码示例

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


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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = TemplatesHelper::getActions();
     Toolbar::title($isNew ? Lang::txt('COM_TEMPLATES_MANAGER_ADD_STYLE') : Lang::txt('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager');
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         Toolbar::apply('style.apply');
         Toolbar::save('style.save');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('style.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('style.cancel');
     } else {
         Toolbar::cancel('style.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     // Get the help information for the template item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('style');
     //$help->key, false, $url);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:39,代码来源:view.html.php

示例2: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $canDo = MenusHelper::getActions($this->state->get('filter.parent_id'));
     Toolbar::title(Lang::txt($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png');
     // If a new item, can save the item.  Allow users with edit permissions to apply changes to prevent returning to grid.
     if ($isNew && $canDo->get('core.create')) {
         if ($canDo->get('core.edit')) {
             Toolbar::apply('menu.apply');
         }
         Toolbar::save('menu.save');
     }
     // If user can edit, can save the item.
     if (!$isNew && $canDo->get('core.edit')) {
         Toolbar::apply('menu.apply');
         Toolbar::save('menu.save');
     }
     // If the user can create new items, allow them to see Save & New
     if ($canDo->get('core.create')) {
         Toolbar::save2new('menu.save2new');
     }
     if ($isNew) {
         Toolbar::cancel('menu.cancel');
     } else {
         Toolbar::cancel('menu.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('menu');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:35,代码来源:view.html.php

示例3: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     // Since we don't track these assets at the item level, use the category id.
     $canDo = NewsfeedsHelper::getActions($this->item->catid, 0);
     Toolbar::title(Lang::txt('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) {
         Toolbar::apply('newsfeed.apply');
         Toolbar::save('newsfeed.save');
     }
     if (!$checkedOut && count(User::getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) {
         Toolbar::save2new('newsfeed.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('newsfeed.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('newsfeed.cancel');
     } else {
         Toolbar::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:34,代码来源:view.html.php

示例4: addToolbar

 /**
  * Display the toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     $canDo = UsersHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     Toolbar::title(Lang::txt('COM_USERS_NOTES'), 'user');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count(User::getAuthorisedCategories('com_users', 'core.create')))) {
         Toolbar::apply('note.apply');
         Toolbar::save('note.save');
     }
     if (!$checkedOut && count(User::getAuthorisedCategories('com_users', 'core.create'))) {
         Toolbar::save2new('note.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && count(User::getAuthorisedCategories('com_users', 'core.create')) > 0) {
         Toolbar::save2copy('note.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('note.cancel');
     } else {
         Toolbar::cancel('note.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('note');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:34,代码来源:view.html.php

示例5: 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

示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     Toolbar::title(Lang::txt('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user-profile');
     Toolbar::apply('profile.apply');
     Toolbar::save('profile.save');
     Toolbar::cancel('profile.cancel', 'JTOOLBAR_CLOSE');
     Toolbar::divider();
     Toolbar::help('JHELP_ADMIN_USER_PROFILE_EDIT');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:15,代码来源:view.html.php

示例7: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     if ($this->getLayout() == 'edit') {
         Toolbar::title(Lang::txt('COM_MESSAGES_WRITE_PRIVATE_MESSAGE'), 'new-privatemessage.png');
         Toolbar::save('message.save', 'COM_MESSAGES_TOOLBAR_SEND');
         Toolbar::cancel('message.cancel');
         Toolbar::help('JHELP_COMPONENTS_MESSAGING_WRITE');
     } else {
         Toolbar::title(Lang::txt('COM_MESSAGES_VIEW_PRIVATE_MESSAGE'), 'inbox.png');
         $sender = JUser::getInstance($this->item->user_id_from);
         if ($sender->authorise('core.admin') || $sender->authorise('core.manage', 'com_messages') && $sender->authorise('core.login.admin')) {
             Toolbar::custom('message.reply', 'restore.png', 'restore_f2.png', 'COM_MESSAGES_TOOLBAR_REPLY', false);
         }
         Toolbar::cancel('message.cancel');
         Toolbar::help('JHELP_COMPONENTS_MESSAGING_READ');
     }
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:22,代码来源:view.html.php

示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == User::get('id'));
     $canDo = ModulesHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     $item = $this->get('Item');
     Toolbar::title(Lang::txt('COM_MODULES_MANAGER_MODULE', Lang::txt($this->item->module)), 'module.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         Toolbar::apply('module.apply');
         Toolbar::save('module.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         Toolbar::save2new('module.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('module.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('module.cancel');
     } else {
         Toolbar::cancel('module.cancel', 'JTOOLBAR_CLOSE');
     }
     // Get the help information for the menu item.
     $lang = Lang::getRoot();
     $help = $this->get('Help');
     if ($lang->hasKey($help->url)) {
         $debug = $lang->setDebug(false);
         $url = Lang::txt($help->url);
         $lang->setDebug($debug);
     } else {
         $url = null;
     }
     Toolbar::help('module');
     //$help->key, false, $url);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:43,代码来源:view.html.php

示例9: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', true);
     $userId = User::get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     Toolbar::title(Lang::txt('COM_CONTENT_PAGE_' . ($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($isNew && count(User::getAuthorisedCategories('com_content', 'core.create')) > 0) {
         Toolbar::apply('article.apply');
         Toolbar::save('article.save');
         Toolbar::save2new('article.save2new');
         Toolbar::cancel('article.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 Toolbar::apply('article.apply');
                 Toolbar::save('article.save');
                 // We can save this record, but check the create permission to see if we can return to make a new one.
                 if ($canDo->get('core.create')) {
                     Toolbar::save2new('article.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             Toolbar::save2copy('article.save2copy');
         }
         Toolbar::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('article');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:42,代码来源:view.html.php

示例10: defined

 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <zooley@purdue.edu>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_CONFIG_GLOBAL_CONFIGURATION'), 'config.png');
Toolbar::apply('application.apply');
Toolbar::save('application.save');
Toolbar::divider();
Toolbar::cancel('application.cancel');
Toolbar::divider();
Toolbar::help('global_config');
// Load tooltips behavior
Html::behavior('formvalidation');
Html::behavior('switcher', 'submenu');
Html::behavior('tooltip');
// Load submenu template, using element id 'submenu' as needed by behavior.switcher
$this->document->setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'application.cancel' || document.formvalidator.isValid($('#application-form'))) {
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:default.php

示例11: defined

 * @package   hubzero-cms
 * @author    Alissa Nedossekina <alisa@purdue.edu>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$canDo = \Components\Jobs\Helpers\Permissions::getActions('category');
Toolbar::title(Lang::txt('COM_JOBS') . ': ' . Lang::txt('COM_JOBS_CATEGORIES'), 'addedit.png');
if ($canDo->get('core.create')) {
    Toolbar::addNew();
}
if ($canDo->get('core.edit')) {
    Toolbar::editList();
}
Toolbar::save('saveorder', 'COM_JOBS_SAVE_ORDER');
if ($canDo->get('core.delete')) {
    Toolbar::deleteList();
}
Toolbar::spacer();
Toolbar::help('categories');
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller);
?>
" method="post" name="adminForm" id="adminForm">
	<table class="adminlist">
		<thead>
			<tr>
				<th scope="col">
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:display.php

示例12: defined

 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_PUBLICATIONS_PUBLICATION') . ' ' . Lang::txt('COM_PUBLICATIONS_MASTER_TYPE') . ' - ' . $this->row->type . ': [ ' . Lang::txt('COM_PUBLICATIONS_MTYPE_ADVANCED') . ' ]', 'addedit.png');
Toolbar::save('saveadvanced');
Toolbar::cancel();
$params = new \Hubzero\Config\Registry($this->row->params);
$manifest = $this->curation->_manifest;
$curParams = $manifest->params;
$blocks = $manifest->blocks;
$blockSelection = array('active' => array());
?>
<script type="text/javascript">
function submitbutton(pressbutton)
{
	submitform( pressbutton );
	return;
}
</script>
<p class="backto"><a href="<?php 
开发者ID:sumudinie,项目名称:hubzero-cms,代码行数:31,代码来源:advanced.php

示例13: defined

 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_PROJECTS') . ': ' . Lang::txt('COM_PROJECTS_CUSTOM_DESCRIPTION'));
if (User::authorise('core.edit') || User::authorise('core.create')) {
    Toolbar::apply('applyDescription');
    Toolbar::save('saveDescription');
    Toolbar::spacer();
}
Toolbar::cancel();
Toolbar::divider();
//Toolbar::help('user');
$elements = array();
foreach ($this->fields as $field) {
    $element = new stdClass();
    $element->label = (string) $field->get('label');
    $element->name = (string) $field->get('name');
    $element->field_type = (string) $field->get('type');
    if ($element->field_type == 'select') {
        $element->field_type = 'dropdown';
    }
    if ($element->field_type == 'textarea' || $element->field_type == 'editor') {
开发者ID:kevinwojo,项目名称:hubzero-cms,代码行数:31,代码来源:description.php

示例14: defined

 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
$this->css()->js('curation.js');
Toolbar::title(Lang::txt('COM_PUBLICATIONS_PUBLICATION') . ' ' . Lang::txt('COM_PUBLICATIONS_MASTER_TYPE') . ' - ' . $this->row->type . ': ' . Lang::txt('COM_PUBLICATIONS_FIELD_CURATION_ADD_BLOCK'), 'addedit.png');
Toolbar::save('saveblock');
Toolbar::cancel();
$params = new \Hubzero\Config\Registry($this->row->params);
$manifest = $this->curation->_manifest;
$curParams = $manifest->params;
$blocks = $manifest->blocks;
$blockSelection = array('active' => array());
$masterBlocks = array();
foreach ($this->blocks as $b) {
    $masterBlocks[$b->block] = $b;
}
foreach ($blocks as $blockId => $block) {
    $blockSelection['active'][] = $block->name;
}
?>
<script type="text/javascript">
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:addblock.php

示例15: defined

 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('MEMBERS') . ': Manage Points', 'user.png');
Toolbar::save('saveconfig', 'Save Configuration');
Toolbar::cancel();
?>

<?php 
$this->view('_submenu')->display();
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option);
?>
" method="post" name="adminForm" id="adminForm">
	<table class="adminlist">
		<thead>
			<tr>
				<th scope="col">#</th>
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:config.php


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