本文整理汇总了PHP中Permissions::canPreviewPageAsUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canPreviewPageAsUser方法的具体用法?PHP Permissions::canPreviewPageAsUser怎么用?PHP Permissions::canPreviewPageAsUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canPreviewPageAsUser方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
break;
case 'edit_permissions':
if (PERMISSIONS_MODEL == 'simple') {
$toolSection = 'collection_permissions_simple';
} else {
$toolSection = "permission/lists/collection";
}
$canViewPane = $cp->canEditPagePermissions();
break;
case 'set_advanced_permissions':
$toolSection = "permission/details/collection";
$canViewPane = $cp->canEditPagePermissions();
break;
case 'preview_page_as_user':
$toolSection = "collection_preview_as_user";
$canViewPane = $cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced';
break;
case 'view_timed_permission_list':
$toolSection = "collection_timed_permission_list";
$canViewPane = $cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced';
break;
case 'mcd':
$toolSection = "collection_mcd";
$canViewPane = $cp->canMoveOrCopyPage();
$divID = "ccm-collection-mcd";
break;
case 'delete':
$toolSection = "collection_delete";
$canViewPane = $cp->canDeletePage();
break;
case 'set_theme':
示例2: Permissions
$c = Page::getByID($_GET['cID'], 'RECENT');
$cp = new Permissions($c);
$canViewPane = false;
$additionalArgs = array();
switch ($_GET['ctask']) {
case 'edit_permissions':
$toolSection = "permission/lists/collection";
$canViewPane = $cp->canEditPagePermissions();
break;
case 'set_advanced_permissions':
$toolSection = "permission/details/collection";
$canViewPane = $cp->canEditPagePermissions();
break;
case 'preview_page_as_user':
$toolSection = "collection_preview_as_user";
$canViewPane = $cp->canPreviewPageAsUser() && Config::get('concrete.permissions.model') == 'advanced';
break;
case 'view_timed_permission_list':
$toolSection = "collection_timed_permission_list";
$canViewPane = $cp->canPreviewPageAsUser() && Config::get('concrete.permissions.model') == 'advanced';
break;
}
if (!isset($divID)) {
$divID = 'ccm-edit-collection';
}
if (!$canViewPane) {
die(t("Access Denied."));
}
?>
<div id="<?php
示例3: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$c = Page::getByID($_REQUEST['cID'], 'RECENT');
//,"ACTIVE"
$cp = new Permissions($c);
if ($cp->canPreviewPageAsUser() && PERMISSIONS_MODEL == 'advanced') {
$v = View::getInstance();
$v->disableEditing();
$v->disableLinks();
$req = Request::get();
$req->setCustomRequestUser(false);
if (isset($_REQUEST['customUser'])) {
$ui = UserInfo::getByUserName($_REQUEST['customUser']);
if (is_object($ui)) {
$req->setCustomRequestUser($ui->getUserObject());
}
}
$dt = Loader::helper('form/date_time');
$date = $dt->translate('onDate', $_REQUEST);
$req->setCustomRequestDateTime($date);
$req = Request::get();
$cp = new Permissions($c);
if ($cp->canRead()) {
$v->render($c);
} else {
print t('Unable to view page.');
}
}
示例4: t
}
if ($cp->canViewPageVersions()) {
?>
<li>
<a href="#" data-launch-sub-panel-url="<?php
echo URL::to('/ccm/system/panels/page/versions');
?>
">
<?php
echo t('Versions');
?>
</a>
</li>
<?php
}
if ($cp->canPreviewPageAsUser() && Config::get('concrete.permissions_model') == 'advanced') {
?>
<li>
<a href="#" data-launch-sub-panel-url="<?php
echo URL::to('/ccm/system/panels/page/preview_as_user');
?>
"
data-launch-panel-detail="preview-page"
data-panel-detail-url="<?php
echo URL::to('/ccm/system/panels/page/preview_as_user/preview');
?>
"
data-panel-transition="fade">
<?php
echo t('View as User');
?>