Bitrix API

PermissionRestrictedNodeRepository extends NodeRepository

FinalYes

Table of Contents

Methods

__construct()  : mixed
create()  : Node
deleteById()  : void
Delete a node and all associated data from the database.
findAllByAccessCodes()  : NodeCollection
findAllByIds()  : NodeCollection
findAllByUserId()  : NodeCollection
findAllByUserIdAndRoleId()  : NodeCollection
findAllByXmlId()  : NodeCollection
getAllByStructureId()  : NodeCollection
getAllChildIdsByNodeId()  : array<int, int>
Retrieves all child ids of a given node id.
getAllPagedByStructureId()  : NodeCollection
getByAccessCode()  : Node|null
Retrieve a node by access code.
getById()  : Node|null
getByIdWithDepth()  : Node|null
returns node data with depth level
getChildOf()  : NodeCollection
getChildOfNodeCollection()  : NodeCollection
Get child nodes of a node collection.
getNodesByName()  : NodeCollection
getParentOf()  : NodeCollection
getRootNodeByStructureId()  : Node|null
Retrieves the root node by structure id.
hasChild()  : bool
isAncestor()  : bool
mapItemToModel()  : Node
update()  : Node

Methods

deleteById()

Delete a node and all associated data from the database.

public deleteById(int $nodeId) : void
Parameters
$nodeId : int
Tags
throws
ArgumentException
throws
SystemException
throws
ObjectPropertyException

findAllByAccessCodes()

public findAllByAccessCodes(array<int, int> $departments) : NodeCollection
Parameters
$departments : array<int, int>
Tags
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException
Return values
NodeCollection

findAllByIds()

public findAllByIds(array<string|int, mixed> $departmentIds[, NodeActiveFilter $activeFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE ]) : NodeCollection
Parameters
$departmentIds : array<string|int, mixed>
$activeFilter : NodeActiveFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE
Tags
throws
ObjectPropertyException
throws
SystemException
throws
ArgumentException
Return values
NodeCollection

getAllChildIdsByNodeId()

Retrieves all child ids of a given node id.

public getAllChildIdsByNodeId(int $nodeId) : array<int, int>
Parameters
$nodeId : int
Return values
array<int, int>

getByAccessCode()

Retrieve a node by access code.

public getByAccessCode(string $accessCode) : Node|null
Parameters
$accessCode : string

The access code of the node.

Return values
Node|null

The node with the given access code, or null if not found.

getById()

public getById(int $nodeId[, bool $needDepth = false ]) : Node|null
Parameters
$nodeId : int
$needDepth : bool = false
Tags
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException
Return values
Node|null

getByIdWithDepth()

returns node data with depth level

public getByIdWithDepth(int $nodeId) : Node|null
Parameters
$nodeId : int
Tags
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException
Return values
Node|null

getChildOfNodeCollection()

Get child nodes of a node collection.

public getChildOfNodeCollection(NodeCollection $nodeCollection[, DepthLevel|int $depthLevel = DepthLevel::FIRST ][, NodeActiveFilter $activeFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE ]) : NodeCollection
Parameters
$nodeCollection : NodeCollection

The parent node collection.

$depthLevel : DepthLevel|int = DepthLevel::FIRST

[optional] The depth level of child nodes. Default is DepthLevel::FIRST.

$activeFilter : NodeActiveFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE
Return values
NodeCollection

The child node collection.

getNodesByName()

public getNodesByName(int $structureId, string|null $name[, int|null $limit = 100 ][, int|null $parentId = null ][, DepthLevel|int $depth = DepthLevel::FULL ][, bool $strict = false ][, mixed $activeFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE ]) : NodeCollection
Parameters
$structureId : int
$name : string|null
$limit : int|null = 100
$parentId : int|null = null
$depth : DepthLevel|int = DepthLevel::FULL
$strict : bool = false
$activeFilter : mixed = NodeActiveFilter::ONLY_GLOBAL_ACTIVE
Return values
NodeCollection

getRootNodeByStructureId()

Retrieves the root node by structure id.

public getRootNodeByStructureId(int $structureId) : Node|null
Parameters
$structureId : int
Tags
throws
ArgumentException
throws
ObjectPropertyException
throws
SystemException
Return values
Node|null

        
On this page

Search results