本文整理汇总了PHP中Permissions::canEditGatheringItems方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canEditGatheringItems方法的具体用法?PHP Permissions::canEditGatheringItems怎么用?PHP Permissions::canEditGatheringItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canEditGatheringItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
" data-gathering-item-batch-timestamp="<?php
echo $item->getGatheringItemBatchTimestamp();
?>
" data-gathering-item-id="<?php
echo $item->getGatheringItemID();
?>
" class="ccm-gathering-item h<?php
echo $item->getGatheringItemSlotHeight();
?>
w<?php
echo $item->getGatheringItemSlotWidth();
?>
">
<div class="ccm-gathering-item-inner">
<?php
if ($showTileControls && $ap->canEditGatheringItems()) {
?>
<div class="ccm-ui">
<ul class="ccm-gathering-item-inline-commands ccm-ui">
<li class="ccm-gathering-item-inline-move"><a data-inline-command="move-tile" href="#"><i class="fa fa-arrows"></i></a></li>
<li class="ccm-gathering-item-inline-options"><a data-inline-command="options-tile" href="#" data-launch-menu="gathering-menu-<?php
echo $item->getGatheringItemID();
?>
"><i class="fa fa-cog"></i></a></li>
</ul>
<div class="popover fade" data-menu="gathering-menu-<?php
echo $item->getGatheringItemID();
?>
">
<div class="arrow"></div>
示例2: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$nh = Loader::helper('validation/numbers');
$form = Loader::helper('form');
$gaiID = intval($_REQUEST['gaiID']);
$gatTypeID = intval($_REQUEST['gatTypeID']);
$type = GatheringItemTemplateType::getByID($gatTypeID);
$nh = Loader::helper('validation/numbers');
$item = GatheringItem::getByID($gaiID);
if (is_object($item) && is_object($type)) {
$gathering = $item->getGatheringObject();
$agp = new Permissions($gathering);
if ($agp->canEditGatheringItems() && Loader::helper('validation/token')->validate('edit_gathering_item_template', $_REQUEST['token'])) {
$reloadItemTile = false;
if ($type->getGatheringItemTemplateTypeHandle() == 'tile') {
$reloadItemTile = true;
}
if ($_POST['task'] == 'update_item_template') {
$template = GatheringItemTemplate::getByID($_POST['gatID']);
$item->setGatheringItemTemplate($type, $template);
if ($reloadItemTile) {
$item->render($type);
}
exit;
}
$assignments = GatheringItemFeatureAssignment::getList($item);
$features = array();
foreach ($assignments as $as) {
$f = $as->getFeatureObject();
if (is_object($f)) {
示例3: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$nh = Loader::helper('validation/numbers');
if ($_POST['gaID'] && $nh->integer($_POST['gaID'])) {
$gathering = Gathering::getByID($_POST['gaID']);
if (is_object($gathering) && Loader::helper('validation/token')->validate('update_gathering_items', $_POST['editToken'])) {
$agp = new Permissions($gathering);
if ($agp->canEditGatheringItems()) {
switch ($_POST['task']) {
case 'resize':
$agi = GatheringItem::getByID($_POST['gaiID']);
$sw = intval($_POST['gaiSlotWidth']);
$sh = intval($_POST['gaiSlotHeight']);
if (!$sw) {
$sw = 1;
}
if (!$sh) {
$sh = 1;
}
$agi->setGatheringItemSlotWidth($sw);
$agi->setGatheringItemSlotHeight($sh);
break;
case 'update_display_order':
$displayOrder = 0;
$batch = time();
foreach ($_POST['gaiID'] as $gaiID) {
$agi = GatheringItem::getByID($gaiID);
$agi->setGatheringItemBatchTimestamp($batch);
$agi->setGatheringItemBatchDisplayOrder($displayOrder);
++$displayOrder;