本文整理汇总了PHP中Permissions::canAddTopicTreeNode方法的典型用法代码示例。如果您正苦于以下问题:PHP Permissions::canAddTopicTreeNode方法的具体用法?PHP Permissions::canAddTopicTreeNode怎么用?PHP Permissions::canAddTopicTreeNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Permissions
的用法示例。
在下文中一共展示了Permissions::canAddTopicTreeNode方法的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: getTreeNodeJSON
public function getTreeNodeJSON()
{
$obj = parent::getTreeNodeJSON();
if (is_object($obj)) {
$p = new \Permissions($this);
$obj->canAddTopicTreeNode = $p->canAddTopicTreeNode();
return $obj;
}
}
示例3: getTreeNodeJSON
public function getTreeNodeJSON()
{
$obj = parent::getTreeNodeJSON();
if (is_object($obj)) {
$obj->folder = true;
$p = new \Permissions($this);
$data = $this->getTreeObject()->getRequestData();
if (is_array($data) && $data['allowFolderSelection']) {
$obj->hideCheckbox = false;
} else {
$obj->hideCheckbox = true;
}
$obj->icon = 'fa fa-folder';
$obj->canAddTopicTreeNode = $p->canAddTopicTreeNode();
$obj->canAddCategoryTreeNode = $p->canAddCategoryTreeNode();
return $obj;
}
}
示例4: canAccess
protected function canAccess()
{
$node = $this->getNode();
$np = new \Permissions($node);
return $np->canAddTopicTreeNode();
}
示例5: die
<?php
defined('C5_EXECUTE') or die("Access Denied.");
$form = Loader::helper('form');
$parent = \Concrete\Core\Tree\Node\Node::getByID(Loader::helper('security')->sanitizeInt($_REQUEST['treeNodeParentID']));
$np = new Permissions($parent);
$tree = $parent->getTreeObject();
if ($tree->getTreeTypeHandle() != 'topic') {
die;
}
$url = View::url('/dashboard/system/attributes/topics', 'add_topic_node', $parent->getTreeNodeID());
if (is_object($parent) && $np->canAddTopicTreeNode()) {
?>
<div class="ccm-ui">
<form method="post" data-topic-form="add-topic-node" class="form-horizontal" action="<?php
echo $url;
?>
">
<?php
echo Loader::helper('validation/token')->output('add_topic_node');
?>
<div class="form-group">
<?php
echo $form->label('treeNodeTopicName', t('Topic'));
?>
<?php
echo $form->text('treeNodeTopicName', '', array('class' => 'span4'));
?>
</div>