當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Permissions::canEditPageTemplate方法代碼示例

本文整理匯總了PHP中Permissions::canEditPageTemplate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Permissions::canEditPageTemplate方法的具體用法?PHP Permissions::canEditPageTemplate怎麽用?PHP Permissions::canEditPageTemplate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Permissions的用法示例。


在下文中一共展示了Permissions::canEditPageTemplate方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: t

                                       dialog-modal="false" dialog-title="<?php 
            echo t('Composer');
            ?>
" href="<?php 
            echo URL::to('/ccm/system/panels/details/page/composer');
            ?>
?cID=<?php 
            echo $cID;
            ?>
"><?php 
            echo t('Composer');
            ?>
</a></li>
                            <?php 
        }
        if ($permissions->canEditPageProperties() || $permissions->canEditPageTheme() || $permissions->canEditPageTemplate() || $permissions->canDeletePage() || $permissions->canEditPagePermissions()) {
            ?>
                                <li><a class="dialog-launch" dialog-width="640" dialog-height="360"
                                       dialog-modal="false" dialog-title="<?php 
            echo t('SEO');
            ?>
" href="<?php 
            echo URL::to('/ccm/system/panels/details/page/seo');
            ?>
?cID=<?php 
            echo $cID;
            ?>
"><?php 
            echo t('SEO');
            ?>
</a></li>
開發者ID:kreativmind,項目名稱:concrete5-5.7.0,代碼行數:31,代碼來源:page_controls_footer.php

示例2: t

defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\Attribute\Set as AttributeSet;
$cp = new Permissions($c);
$pk = PermissionKey::getByHandle('edit_page_properties');
$pk->setPermissionObject($c);
$asl = $pk->getMyAssignment();
$seoSet = AttributeSet::getByHandle('seo');
?>
<section>
    <header><?php 
echo t('Page Settings');
?>
</header>
    <?php 
if ($cp->canEditPageContents() || $cp->canEditPageTheme() || $cp->canEditPageProperties() || $cp->canEditPageTemplate()) {
    ?>

    <menu class="ccm-panel-page-basics">
        <?php 
    $pagetype = PageType::getByID($c->getPageTypeID());
    if (is_object($pagetype) && $cp->canEditPageContents()) {
        ?>
            <li>
                <a href="#" data-launch-panel-detail="page-composer"
                   data-panel-detail-url="<?php 
        echo URL::to('/ccm/system/panels/details/page/composer');
        ?>
"
                   data-panel-transition="fade">
                    <?php 
開發者ID:ceko,項目名稱:concrete5-1,代碼行數:30,代碼來源:page.php

示例3: Permissions

}
$pcnt = 0;
$isMasterCollection = false;
$isSinglePage = false;
$tArray = PageTheme::getGlobalList();
$tArray2 = PageTheme::getLocalList();
$tArray = array_merge($tArray, $tArray2);
foreach ($pages as $c) {
    if ($c->isGeneratedCollection()) {
        $isSinglePage = true;
    }
    if ($c->isMasterCollection()) {
        $isMasterCollection = true;
    }
    $cp = new Permissions($c);
    if ($cp->canEditPageTheme() && $cp->canEditPageTemplate()) {
        $pcnt++;
    }
}
if ($pcnt > 0) {
    // i realize there are a lot of loops through this, but the logic here is a bit tough to follow if you don't do it this way.
    // first we determine which page types to show, if any
    $notAllowedPageTypes = array();
    $allowedPageTypes = array();
    $ctArray = PageType::getList();
    foreach ($ctArray as $ct) {
        foreach ($pages as $c) {
            if ($c->getCollectionID() != HOME_CID) {
                $parentC = Page::getByID($c->getCollectionParentID());
                $parentCP = new Permissions($parentC);
                if (!$parentCP->canAddSubCollection($ct)) {
開發者ID:meixelsberger,項目名稱:concrete5-5.7.0,代碼行數:31,代碼來源:design.php

示例4: t

 <? } ?>
 <li class="parent-ul"><i class="fa fa-cog mobile-leading-icon"></i><a href="#"><?php echo t(
             'Page Properties') ?><i class="fa fa-caret-down"></i></a>
     <ul class="list-unstyled">
         <?
         $pagetype = PageType::getByID($c->getPageTypeID());
         if (is_object($pagetype) && $cp->canEditPageContents()) { ?>
             <li><a class="dialog-launch" dialog-width="640" dialog-height="640"
                    dialog-modal="false" dialog-title="<?= t('Composer') ?>" href="<?= URL::to(
                     '/ccm/system/panels/details/page/composer') ?>?cID=<?= $cID ?>"><?= t(
                         'Composer') ?></a></li>
         <?
         }
         if ($permissions->canEditPageProperties() ||
             $permissions->canEditPageTheme() ||
             $permissions->canEditPageTemplate() ||
             $permissions->canDeletePage() ||
             $permissions->canEditPagePermissions()) { ?>
             <li><a class="dialog-launch" dialog-width="640" dialog-height="360"
                    dialog-modal="false" dialog-title="<?= t('SEO') ?>" href="<?= URL::to(
                     '/ccm/system/panels/details/page/seo') ?>?cID=<?= $cID ?>"><?= t(
                         'SEO') ?></a></li>
         <?
         }
         if ($permissions->canEditPageProperties()) {
             if ($cID > 1) {
                 ?>
                 <li><a class="dialog-launch" dialog-width="500" dialog-height="500"
                        dialog-modal="false" dialog-title="<?= t('Location') ?>"
                        href="<?= URL::to(
                            '/ccm/system/panels/details/page/location') ?>?cID=<?= $cID ?>"><?= t(
開發者ID:JeRoNZ,項目名稱:concrete5-1,代碼行數:31,代碼來源:page_controls_footer.php

示例5: t

use Concrete\Core\Attribute\Set as AttributeSet;
$cp = new Permissions($c);
$pk = PermissionKey::getByHandle('edit_page_properties');
$pk->setPermissionObject($c);
$asl = $pk->getMyAssignment();
$seoSet = AttributeSet::getByHandle('seo');
?>
<section>
    <header><?php 
echo t('Page Settings');
?>
</header>
    <? if ($cp->canEditPageContents()
        || $cp->canEditPageTheme()
        || $cp->canEditPageProperties()
        || $cp->canEditPageTemplate()) { ?>

    <menu class="ccm-panel-page-basics">
        <?php 
$pagetype = PageType::getByID($c->getPageTypeID());
if (is_object($pagetype) && $cp->canEditPageContents()) {
    ?>
            <li>
                <a href="#" data-launch-panel-detail="page-composer"
                   data-panel-detail-url="<?php 
    echo URL::to('/ccm/system/panels/details/page/composer');
    ?>
"
                   data-panel-transition="fade">
                    <?php 
    echo t('Composer');
開發者ID:JeRoNZ,項目名稱:concrete5-1,代碼行數:31,代碼來源:page.php


注:本文中的Permissions::canEditPageTemplate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。