本文整理汇总了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');
}
}
}
示例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');
}
示例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();
}
示例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 = '';
}