当前位置: 首页>>代码示例>>PHP>>正文


PHP Permissions::canEditTreeNodePermissions方法代码示例

本文整理汇总了PHP中Permissions::canEditTreeNodePermissions方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canEditTreeNodePermissions方法的具体用法?PHP Permissions::canEditTreeNodePermissions怎么用?PHP Permissions::canEditTreeNodePermissions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Permissions的用法示例。


在下文中一共展示了Permissions::canEditTreeNodePermissions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:26,代码来源:CategoryMenu.php

示例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));
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:17,代码来源:FileFolderMenu.php

示例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));
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:20,代码来源:TopicMenu.php

示例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));
     }
 }
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:15,代码来源:GroupMenu.php

示例5: die

<?php

defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\Tree\Node\Node as TreeNode;
if ($_REQUEST['treeNodeID'] > 0) {
    $node = TreeNode::getByID($_REQUEST['treeNodeID']);
    $np = new Permissions($node);
    if ($np->canEditTreeNodePermissions()) {
        Loader::element('permission/details/tree/node', array("node" => $node));
    }
}
开发者ID:ppiedaderawnet,项目名称:concrete5,代码行数:11,代码来源:node.php

示例6: die

<?php

defined('C5_EXECUTE') or die("Access Denied.");
$node = \Concrete\Core\Tree\Node\Node::getByID(Loader::helper('security')->sanitizeInt($_REQUEST['treeNodeID']));
$np = new Permissions($node);
if (is_object($node) && $np->canEditTreeNodePermissions()) {
    ?>

<div class="ccm-ui">
	<?php 
    Loader::element('permission/lists/tree/node', array('node' => $node));
    ?>
</div>

<?php 
}
开发者ID:ceko,项目名称:concrete5-1,代码行数:16,代码来源:permissions.php


注:本文中的Permissions::canEditTreeNodePermissions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。