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


PHP Helper_Admin::getActions方法代码示例

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


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

示例1: addToolbar

 protected function addToolbar($search)
 {
     $bar = JToolBar::getInstance('toolbar');
     $canDo = Helper_Admin::getActions();
     $separator = false;
     $title = empty($search->title) ? 'List' : $search->title;
     $user = JFactory::getUser();
     require_once JPATH_COMPONENT . '/helpers/toolbar/link.php';
     require_once JPATH_COMPONENT . '/helpers/toolbar/separator.php';
     JToolBarHelper::title($title, 'stack');
     if (!(is_object($search) && $search->id)) {
         return;
     }
     $form = JCckDatabase::loadResult('SELECT live_value FROM #__cck_core_search_field WHERE fieldid = 1 AND searchid = ' . $search->id . ' AND stage = 0');
     if ($canDo->get('core.create') || $canDo->get('core.edit')) {
         $form = JCckDatabase::loadObject('SELECT id, name, location FROM #__cck_core_types WHERE name = "' . $form . '"');
         if (is_object($form)) {
             $canCreate = $user->authorise('core.create', 'com_cck.form.' . $form->id);
             $creation = !$form->location || $form->location == 'admin' ? true : false;
         } else {
             $canCreate = false;
             $creation = false;
         }
         if ($canCreate && $creation) {
             $link = 'index.php?option=com_cck&view=form&type=' . $form->name . '&return_o=cck&return_v=list&return=' . base64_encode(JFactory::getURI());
             $bar->prependButton('CckLink', 'new', JText::_('JTOOLBAR_NEW'), $link, '_self');
         }
     }
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:29,代码来源:view.html.php

示例2: prepareToolbar

 public function prepareToolbar()
 {
     $canDo = Helper_Admin::getActions();
     $this->e_type = $this->state->get('filter.e_type');
     $type = $this->e_type == 'search' ? _C4_TEXT : _C2_TEXT;
     $type2 = $this->e_type == 'search' ? 'search' : 'form';
     JToolBarHelper::title(JText::_(_C6_TEXT . '_MANAGER') . ' - ' . JText::_('COM_CCK_' . $type . 's'), Helper_Admin::getIcon($this->vName));
     if ($canDo->get('core.delete')) {
         JToolBarHelper::custom($this->vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
     JToolBar::getInstance('toolbar')->appendButton('CckLink', 'cck-' . $type2, JText::_('COM_CCK_' . $type . 'S'), JRoute::_('index.php?option=com_cck&view=' . $this->e_type . 's'), '_self');
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:13,代码来源:view.html.php

示例3: prepareToolbar

 protected function prepareToolbar()
 {
     $canDo = Helper_Admin::getActions();
     if (JCck::on()) {
         JToolBarHelper::title(CCK_LABEL, 'cck-seblod');
     } else {
         JToolBarHelper::title(' ', 'seblod.png');
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences(CCK_ADDON, 560, 840, 'JTOOLBAR_OPTIONS');
     }
     Helper_Admin::addToolbarSupportButton();
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:13,代码来源:view.php

示例4: prepareToolbar

 public function prepareToolbar()
 {
     $canDo = Helper_Admin::getActions();
     $this->extension = $this->state->get('filter.extension');
     if ($this->extension == 'extension') {
         JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER'), Helper_Admin::getIcon($this->vName));
         return;
     }
     Helper_Session::loadExtensionLang($this->extension);
     JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER') . ' - ' . JText::_($this->extension), Helper_Admin::getIcon($this->vName));
     if ($canDo->get('core.delete')) {
         JToolBarHelper::custom($this->vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
     JToolBar::getInstance('toolbar')->appendButton('CckLink', 'cck-extension', JText::_($this->extension), JRoute::_('index.php?option=' . $this->extension), '_self');
     $this->sidebar = '';
 }
开发者ID:hamby,项目名称:SEBLOD,代码行数:17,代码来源:view.html.php


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