當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。