本文整理匯總了PHP中Permissions::canDeleteTreeNode方法的典型用法代碼示例。如果您正苦於以下問題:PHP Permissions::canDeleteTreeNode方法的具體用法?PHP Permissions::canDeleteTreeNode怎麽用?PHP Permissions::canDeleteTreeNode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Permissions
的用法示例。
在下文中一共展示了Permissions::canDeleteTreeNode方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct(Category $category)
{
parent::__construct($category);
$p = new \Permissions($category);
if ($p->canAddCategoryTreeNode()) {
$this->addItem(new AddCategoryItem($category));
}
if ($p->canAddTopicTreeNode()) {
$this->addItem(new AddTopicItem($category));
}
if ($p->canEditTreeNode()) {
$this->addItem(new EditCategoryItem($category));
}
if ($p->canDuplicateTreeNode()) {
$this->addItem(new CloneItem($category));
}
if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
$this->addItem(new DividerItem());
}
if ($p->canEditTreeNodePermissions()) {
$this->addItem(new EditPermissionsItem($category));
}
if ($p->canDeleteTreeNode()) {
$this->addItem(new DeleteItem($category));
}
}
示例2: __construct
public function __construct(FileFolder $folder)
{
parent::__construct();
$p = new \Permissions($folder);
if ($p->canEditTreeNode()) {
$this->addItem(new EditFolderItem($folder));
}
if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
$this->addItem(new DividerItem());
}
if ($p->canEditTreeNodePermissions() && \Config::get('concrete.permissions.model') != 'simple') {
$this->addItem(new EditPermissionsItem($folder));
}
if ($p->canDeleteTreeNode()) {
$this->addItem(new DeleteItem($folder));
}
}
示例3: __construct
public function __construct(Topic $topic)
{
parent::__construct($topic);
$p = new \Permissions($topic);
if ($p->canEditTreeNode()) {
$this->addItem(new EditTopicItem($topic));
}
if ($p->canDuplicateTreeNode()) {
$this->addItem(new CloneItem($topic));
}
if ($p->canEditTreeNodePermissions() || $p->canDeleteTreeNode()) {
$this->addItem(new DividerItem());
}
if ($p->canEditTreeNodePermissions()) {
$this->addItem(new EditPermissionsItem($topic));
}
if ($p->canDeleteTreeNode()) {
$this->addItem(new DeleteItem($topic));
}
}
示例4: __construct
public function __construct(Group $group)
{
parent::__construct($group);
$p = new \Permissions($group);
if ($p->canEditTreeNode()) {
$url = \URL::to('/dashboard/users/groups', 'edit', $group->getTreeNodeGroupID());
$this->addItem(new LinkItem($url, t('Edit Group')));
}
if ($p->canEditTreeNodePermissions()) {
$this->addItem(new EditPermissionsItem($group));
}
if ($p->canDeleteTreeNode()) {
$this->addItem(new DeleteItem($group));
}
}
示例5: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$form = Loader::helper('form');
$node = \Concrete\Core\Tree\Node\Node::getByID(Loader::helper('security')->sanitizeInt($_REQUEST['treeNodeID']));
$np = new Permissions($node);
$tree = $node->getTreeObject();
$url = View::url('/dashboard/system/attributes/topics', 'remove_tree_node');
if (is_object($node) && $np->canDeleteTreeNode() && $tree->getTreeTypeHandle() == 'topic') {
?>
<div class="ccm-ui">
<form method="post" data-topic-form="remove-tree-node" class="form-horizontal" action="<?php
echo $url;
?>
">
<?php
echo Loader::helper('validation/token')->output('remove_tree_node');
?>
<input type="hidden" name="treeNodeID" value="<?php
echo $node->getTreeNodeID();
?>
" />
<p><?php
echo t('Are you sure you want to remove this node? It will not remove any resources from the system but it will remove all subcategories and their catalog resource references.');
?>
</p>
<div class="dialog-buttons">
<button class="btn btn-default" onclick="jQuery.fn.dialog.closeTop()"><?php
echo t('Cancel');