コード例 #1
0
<?php

defined('C5_EXECUTE') or die("Access Denied.");
$btl = new BlockTypeList();
$blockTypes = $btl->get();
$handles = '';
$ap = new Permissions($a);
$class = 'ccm-area';
if ($a->isGlobalArea()) {
    $class .= ' ccm-global-area';
}
$c = Page::getCurrentPage();
$css = $c->getAreaCustomStyle($a);
if (is_object($css)) {
    $class .= ' ' . $css->getContainerClass();
}
$canAddGathering = false;
foreach ($blockTypes as $bt) {
    if ($ap->canAddBlockToArea($bt)) {
        $handles .= $bt->getBlockTypeHandle() . ' ';
        if ($bt->getBlockTypeHandle() == BLOCK_HANDLE_GATHERING) {
            $canAddGathering = true;
        }
    }
}
if ($ap->canAddLayout()) {
    $handles .= BLOCK_HANDLE_LAYOUT_PROXY . ' ';
}
if ($ap->canAddStack()) {
    $handles .= 'stack ';
}