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


PHP Permissions::canAddLayoutToArea方法代码示例

本文整理汇总了PHP中Permissions::canAddLayoutToArea方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canAddLayoutToArea方法的具体用法?PHP Permissions::canAddLayoutToArea怎么用?PHP Permissions::canAddLayoutToArea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Permissions的用法示例。


在下文中一共展示了Permissions::canAddLayoutToArea方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$json = Loader::helper('json');
$c = Page::getByID($_REQUEST['cID']);
$a = Area::get($c, $_GET['arHandle']);
if (!is_object($c) || !is_object($a)) {
    $jsonData = array();
    $jsonData['msg'] = t('Access Denied.');
    echo $json->encode($jsonData);
    exit;
}
$nvc = $c->getVersionToModify();
$cp = new Permissions($c);
$ap = new Permissions($a);
if (!$cp->canEditPageContents() || !$ap->canAddLayoutToArea()) {
    $jsonData = array();
    $jsonData['msg'] = t('Access Denied.');
    echo $json->encode($jsonData);
    exit;
}
$valt = Loader::helper('validation/token');
$token = '&' . $valt->getParameter();
if ($_GET['task'] == 'deletePreset') {
    $layoutPreset = LayoutPreset::getByID($_REQUEST['lpID']);
    if (is_object($layoutPreset)) {
        $layout = $layoutPreset->getLayoutObject();
        $layoutID = $layout->layoutID;
    }
} else {
    $layoutID = intval($_REQUEST['layoutID']);
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:31,代码来源:layout_services.php

示例2: Permissions

     $stack = Stack::getByID($_REQUEST['stackID']);
     $canViewPane = false;
     if (is_object($stack)) {
         $stp = new Permissions($stack);
         $canViewPane = $stp->canRead() && $ap->canAddStacks();
     }
     break;
 case 'paste':
     $toolSection = "block_area_add_scrapbook";
     $canViewPane = $ap->canAddBlocks();
     break;
 case 'layout':
     $originalLayoutId = intval($_REQUEST['originalLayoutID']) ? intval($_REQUEST['originalLayoutID']) : intval($_REQUEST['layoutID']);
     $args['refreshAction'] = REL_DIR_FILES_TOOLS_REQUIRED . '/edit_area_popup?atask=layout&cID=' . $c->getCollectionID() . '&arHandle=' . $a->getAreaHandle() . '&refresh=1&originalLayoutID=' . $originalLayoutId . '&cvalID=' . $_REQUEST['cvalID'] . '&areaNameNumber=' . intval($_REQUEST['areaNameNumber']);
     $toolSection = "block_area_layout";
     $canViewPane = $ap->canAddLayoutToArea();
     $args['action'] = $a->getAreaUpdateAction('layout') . '&originalLayoutID=' . $originalLayoutId . '&cvalID=' . intval($_REQUEST['cvalID']) . '&areaNameNumber=' . intval($_REQUEST['areaNameNumber']);
     break;
 case 'design':
     $toolSection = 'custom_style';
     $args['style'] = $c->getAreaCustomStyleRule($a);
     $args['action'] = $a->getAreaUpdateAction('design');
     $args['refreshAction'] = REL_DIR_FILES_TOOLS_REQUIRED . '/edit_area_popup?atask=design&cID=' . $c->getCollectionID() . '&arHandle=' . $a->getAreaHandle() . '&refresh=1';
     $canViewPane = $ap->canEditAreaDesign();
     if ($canViewPane) {
         if ($_REQUEST['subtask'] == 'delete_custom_style_preset') {
             $styleToDelete = CustomStylePreset::getByID($_REQUEST['deleteCspID']);
             $styleToDelete->delete();
         }
     }
     break;
开发者ID:Zyqsempai,项目名称:amanet,代码行数:31,代码来源:edit_area_popup.php

示例3: t

echo $a->getAreaID();
?>
"><span><i class="fa fa-share-alt"></i> <?php 
echo $a->getAreaDisplayName();
?>
</span></div>
        <div class="popover fade" data-area-menu="area-menu-a<?php 
echo $a->getAreaID();
?>
">
            <div class="arrow"></div>
            <div class="popover-inner">
                <ul class="dropdown-menu">
                    <?php 
$showAreaDesign = $ap->canEditAreaDesign() && Config::get('concrete.design.enable_custom') == true;
$showAreaLayouts = $ap->canAddLayoutToArea() && Config::get('concrete.design.enable_layouts') == true && !$a->isGlobalArea();
$canEditAreaPermissions = $ap->canEditAreaPermissions() && Config::get('concrete.permissions.model') != 'simple' && !$a->isGlobalArea();
$showAddBlock = (bool) $ap->canAddBlocks();
if ($showAddBlock) {
    ?>
<li><a href='#' data-menu-action="area-add-block"><?php 
    echo t('Add Block');
    ?>
</a></li><?php 
}
if ($showAreaDesign || $showAreaLayouts) {
    if ($showAreaDesign) {
        ?>
<li><a data-menu-action="edit-area-design" href="#"><?php 
        echo t("Edit Area Design");
        ?>
开发者ID:seebaermichi,项目名称:concrete5,代码行数:31,代码来源:block_area_footer.php

示例4: header

             } else {
                 $csr = CustomStyleRule::add($_POST['css_id'], $_POST['css_class_name'], $_POST['css_custom'], $_POST);
                 $nvc->setAreaCustomStyle($area, $csr);
             }
             if ($_POST['cspPresetAction'] == 'create_new_preset') {
                 CustomStylePreset::add($_POST['cspName'], $csr);
             }
         }
         header('Location: ' . BASE_URL . DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $_GET['cID'] . '&mode=edit' . $step);
         exit;
     }
     break;
 case 'layout':
     $area = Area::get($c, $_GET['arHandle']);
     $ap = new Permissions($area);
     if ($ap->canAddLayoutToArea()) {
         Loader::model('custom_style');
         $nvc = $c->getVersionToModify();
         //Loader::model('layout');
         $originalLayoutID = intval($_REQUEST['originalLayoutID']);
         $layoutID = intval($_REQUEST['layoutID']);
         $params = array('type' => 'table', 'rows' => intval($_REQUEST['layout_rows']), 'columns' => intval($_REQUEST['layout_columns']), 'locked' => intval($_REQUEST['locked']), 'spacing' => intval($_REQUEST['spacing']), 'layoutID' => $layoutID);
         //Save Existing layout preset
         $lpID = intval($_REQUEST['lpID']);
         if ($lpID && $_POST['layoutPresetAction'] == 'update_existing_preset') {
             $layoutPreset = LayoutPreset::getByID($lpID);
             if ($layoutPreset) {
                 $layout = $layoutPreset->getLayoutObject();
             }
             if (!$layout || !intval($layout->layoutID)) {
                 throw new Exception(t('Layout preset not found'));
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:31,代码来源:process.php


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