本文整理汇总了PHP中Permissions::canDeleteCollection方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canDeleteCollection方法的具体用法?PHP Permissions::canDeleteCollection怎么用?PHP Permissions::canDeleteCollection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canDeleteCollection方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete($cID = false, $token = false) {
if (Loader::helper('validation/token')->validate('delete', $token)) {
$s = Stack::getByID($cID);
if (is_object($s)) {
$sps = new Permissions($s);
if ($sps->canDeleteCollection()) {
$s->delete();
$this->redirect('/dashboard/blocks/stacks', 'stack_deleted');
} else {
$this->error->add(t('You do not have access to delete this stack.'));
}
} else {
$this->error->add(t('Invalid stack'));
}
} else {
$this->error->add(Loader::helper('validation/token')->getErrorMessage());
}
}
示例2: die
<?
defined('C5_EXECUTE') or die("Access Denied.");
$dh = Loader::helper('concrete/dashboard/sitemap');
if (!$dh->canRead()) {
die(t("Access Denied."));
}
$c = Page::getByID($_REQUEST['cID']);
if (is_object($c) && !$c->isError()) {
$cp = new Permissions($c);
if ($cp->canDeleteCollection()) {
$c->delete();
$message = t('Page deleted.');
$obj = new stdClass;
$obj->message = $message;
print Loader::helper('json')->encode($obj);
}
}
示例3:
}
$canViewPane = $cp->canAdminPage();
break;
case 'edit_permissions_composer':
$toolSection = "collection_permissions";
$canViewPane = $cp->canAdminPage();
$additionalArgs['isComposer'] = true;
break;
case 'mcd':
$toolSection = "collection_mcd";
$canViewPane = $cp->canWrite();
$divID = "ccm-collection-mcd";
break;
case 'delete':
$toolSection = "collection_delete";
$canViewPane = $cp->canDeleteCollection();
break;
case 'set_theme':
$toolSection = "collection_theme";
$divID = 'ccm-edit-collection-design';
$canViewPane = $cp->canWrite();
break;
case 'add':
$toolSection = "collection_add";
$divID = 'ccm-edit-collection-design';
$canViewPane = $cp->canAddSubContent();
if ($_REQUEST['ctID']) {
$ct = CollectionType::getByID($_REQUEST['ctID']);
if (!is_object($ct)) {
$canViewPane = false;
} else {
示例4: t
<?php
if ($cp->canReadVersions() && !$c->isMasterCollection()) {
?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php
if (!$c->isEditMode()) {
?>
style="display: none" <?php
}
?>
><a href="javascript:void(0)" id="ccm-nav-versions"><?php
echo t('Versions');
?>
</a></li>';
<?php
}
if (($sh->canRead() || $cp->canDeleteCollection()) && !$c->isMasterCollection()) {
?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php
if (!$c->isEditMode()) {
?>
style="display: none" <?php
}
?>
><a href="javascript:void(0)" id="ccm-nav-mcd"><?php
echo t('Move/Delete');
?>
</a></li>';
<?php
}
?>
<?php
示例5: t
}
if ($cp->canReadVersions()) {
?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php
if (!$c->isEditMode()) {
?>
style="display: none" <?php
}
?>
><a href="javascript:void(0)" id="ccm-nav-versions"><?php
echo t('Versions');
?>
</a></li>';
<?php
}
if ($sh->canRead() || $cp->canDeleteCollection()) {
?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php
if (!$c->isEditMode()) {
?>
style="display: none" <?php
}
?>
><a href="javascript:void(0)" id="ccm-nav-mcd"><?php
echo t('Move/Delete');
?>
</a></li>';
<?php
}
}
?>
示例6: t
<a class="btn small ccm-main-nav-edit-option" dialog-width="580" dialog-append-buttons="true" dialog-height="420" dialog-title="<?php
echo t('Stack Permissions');
?>
" id="stackPermissions" href="<?php
echo REL_DIR_FILES_TOOLS_REQUIRED;
?>
/edit_area_popup.php?cID=<?php
echo $stack->getCollectionID();
?>
&arHandle=Main&atask=groups"><?php
echo t('Permissions');
?>
</a>
<? } ?>
<? if ($cpc->canDeleteCollection()) { ?>
<a class="btn ccm-button-v2-right small ccm-main-nav-edit-option error" href="javascript:void(0)" onclick="if (confirm('<?php
echo t('Are you sure you want to remove this stack?');
?>
')) { window.location.href='<?php
echo $this->url('/dashboard/blocks/stacks/', 'delete', $stack->getCollectionID(), Loader::helper('validation/token')->generate('delete'));
?>
' }"><?php
echo t('Delete Stack');
?>
</a>
<? } ?>
<?
$vo = $stack->getVersionObject();
if ($cp->canApproveCollection()) {