本文整理汇总了PHP中JUDownloadHelper::getActions方法的典型用法代码示例。如果您正苦于以下问题:PHP JUDownloadHelper::getActions方法的具体用法?PHP JUDownloadHelper::getActions怎么用?PHP JUDownloadHelper::getActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JUDownloadHelper
的用法示例。
在下文中一共展示了JUDownloadHelper::getActions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolBar
protected function addToolBar()
{
$app = JFactory::getApplication();
$app->input->set('hidemainmenu', true);
$isNew = $this->item->id == 0;
$user = JFactory::getUser();
$userId = $user->id;
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
JToolBarHelper::title(JText::_('COM_JUDOWNLOAD_PAGE_' . ($checkedOut ? 'VIEW_FIELD' : ($isNew ? 'ADD_FIELD' : 'EDIT_FIELD'))), 'field-add');
$canDo = JUDownloadHelper::getActions('com_judownload', 'field', $this->item->id);
if ($isNew && $user->authorise('core.create', 'com_judownload')) {
JToolBarHelper::apply('field.apply');
JToolBarHelper::save('field.save');
JToolBarHelper::save2new('field.save2new');
JToolBarHelper::cancel('field.cancel');
} else {
if (!$checkedOut) {
if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
JToolBarHelper::apply('field.apply');
JToolBarHelper::save('field.save');
if ($canDo->get('core.create')) {
JToolBarHelper::save2new('field.save2new');
}
}
}
JToolBarHelper::cancel('field.cancel', 'JTOOLBAR_CLOSE');
}
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->addButtonPath(JPATH_ADMINISTRATOR . "/components/com_judownload/helpers/button");
$bar->appendButton('JUHelp', 'help', JText::_('JTOOLBAR_HELP'));
}
示例2: display
public function display($tpl = null)
{
if (count($errors = $this->get('Errors'))) {
JError::raiseError(500, implode('<br />', $errors));
return false;
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->canDo = JUDownloadHelper::getActions('com_judownload');
$this->addToolBar();
if (JUDownloadHelper::isJoomla3x()) {
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
}
$options = array();
$options[] = JHtml::_('select.option', '1', JText::_('J1'));
$options[] = JHtml::_('select.option', '2', JText::_('J2'));
$options[] = JHtml::_('select.option', '3', JText::_('J3'));
$options[] = JHtml::_('select.option', '4', JText::_('J4'));
$options[] = JHtml::_('select.option', '5', JText::_('J5'));
$options[] = JHtml::_('select.option', '6', JText::_('J6'));
$options[] = JHtml::_('select.option', '7', JText::_('J7'));
$options[] = JHtml::_('select.option', '8', JText::_('J8'));
$options[] = JHtml::_('select.option', '9', JText::_('J9'));
$options[] = JHtml::_('select.option', '10', JText::_('J10'));
$this->f_levels = $options;
$optionsPublished = array();
$optionsPublished[] = JHtml::_('select.option', '1', JText::_('COM_JUDOWNLOAD_PUBLISHED'));
$optionsPublished[] = JHtml::_('select.option', '0', JText::_('COM_JUDOWNLOAD_UNPUBLISHED'));
$this->published_options = $optionsPublished;
parent::display($tpl);
$this->setDocument();
}
示例3: defined
* @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author JoomUltra Co., Ltd
* @website http://www.joomultra.com
* @----------------------------------------------------------------------@
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$rootCat = JUDownloadFrontHelperCategory::getRootCategory();
$cat_id = JFactory::getApplication()->input->getInt("cat_id", $rootCat->id);
$search_in = $this->state->get('filter.search_in');
?>
<ul class="manager-actions nav nav-list" style="margin-bottom: 20px;">
<?php
$actions = JUDownloadHelper::getActions('com_judownload', 'category', $cat_id);
if ($actions->get("judl.document.create")) {
if ($this->docGroupCanDoManage && $this->allowAddDoc) {
echo "<li><a class='add-document' href='index.php?option=com_judownload&task=document.add&cat_id={$cat_id}'><i class='icon-file-add'></i>" . JText::_('COM_JUDOWNLOAD_ADD_DOCUMENT') . "</a></li>";
}
}
if ($actions->get("judl.category.create")) {
if ($this->catGroupCanDoManage) {
echo "<li><a class='add-category' href='index.php?option=com_judownload&task=category.add&parent_id={$cat_id}'><i class='icon-folder-plus'></i>" . JText::_('COM_JUDOWNLOAD_ADD_CATEGORY') . "</a></li>";
}
}
if (JUDownloadHelper::checkGroupPermission(null, "pendingdocuments") && JUDLPROVERSION) {
echo "<li><a class='approved' href='index.php?option=com_judownload&view=pendingdocuments'><i class='icon-clock'></i>" . JText::sprintf('COM_JUDOWNLOAD_PENDING_DOCUMENTS_N', JUDownloadHelper::getTotalPendingDocuments()) . "</a></li>";
}
?>
</ul>