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


PHP Permissions::canEditGatheringItems方法代码示例

本文整理汇总了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>
开发者ID:seebaermichi,项目名称:concrete5,代码行数:31,代码来源:tile.php

示例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)) {
开发者ID:ceko,项目名称:concrete5-1,代码行数:31,代码来源:template.php

示例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;
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:31,代码来源:update.php


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