NodeMemberRepository
Table of Contents
Methods
- countAllByByNodeId() : int
- Counts all members by the given node ID.
- countAllByStructureAndGroupByNode() : array<int, int>
- create() : NodeMember
- createByCollection() : NodeMemberCollection
- findAllByEntityIdAndEntityType() : NodeMemberCollection
- Finds all NodeMembers by their entity ID and entity type.
- findAllByEntityIdAndEntityTypeAndNodeType() : NodeMemberCollection
- findAllByEntityIdsAndEntityType() : NodeMemberCollection
- Finds all NodeMembers by their entity ID and entity type.
- findAllByEntityIdsAndEntityTypeAndNodeType() : NodeMemberCollection
- findAllByNodeId() : NodeMemberCollection
- findAllByNodeIdAndEntityType() : NodeMemberCollection
- findAllByRoleIdAndNodeCollection() : NodeMemberCollection
- findAllByRoleIdAndNodeId() : NodeMemberCollection
- findAllByRoleIdAndStructureId() : NodeMemberCollection
- findByEntityTypeAndEntityIdAndNodeId() : NodeMember|null
- findById() : NodeMember|null
- Finds a NodeMember by its ID.
- findFirstByEntityIdAndEntityTypeAndNodeTypeAndActive() : NodeMember|null
- Finds the first NodeMember by the given entity ID, entity type, node type, and active status.
- getCommonUsersFromRelation() : mixed
- remove() : bool
- removeAllMembersByNodeId() : void
- removeByCollection() : bool
- setActiveByEntityTypeAndEntityId() : Result
- setActiveByEntityTypeAndEntityIds() : Result
- update() : NodeMember
- updateByCollection() : NodeMemberCollection
Methods
countAllByByNodeId()
Counts all members by the given node ID.
public
countAllByByNodeId(int $nodeId) : int
This method takes a node ID as a parameter and returns the total count of members associated with that node.
Parameters
- $nodeId : int
Return values
int —The total count of members associated with the given node ID.
countAllByStructureAndGroupByNode()
public
countAllByStructureAndGroupByNode(Structure $structure) : array<int, int>
Parameters
- $structure : Structure
Return values
array<int, int>create()
public
create(NodeMember $nodeMember) : NodeMember
Parameters
- $nodeMember : NodeMember
Tags
Return values
NodeMembercreateByCollection()
public
createByCollection(NodeMemberCollection $nodeMemberCollection) : NodeMemberCollection
Parameters
- $nodeMemberCollection : NodeMemberCollection
Return values
NodeMemberCollectionfindAllByEntityIdAndEntityType()
Finds all NodeMembers by their entity ID and entity type.
public
findAllByEntityIdAndEntityType(int $entityId, MemberEntityType $entityType) : NodeMemberCollection
Parameters
- $entityId : int
- $entityType : MemberEntityType
Return values
NodeMemberCollectionfindAllByEntityIdAndEntityTypeAndNodeType()
public
findAllByEntityIdAndEntityTypeAndNodeType(int $entityId, MemberEntityType $entityType, NodeEntityType $nodeType[, int $limit = 0 ][, int $offset = 0 ][, NodeActiveFilter $activeFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE ]) : NodeMemberCollection
Parameters
- $entityId : int
- $entityType : MemberEntityType
- $nodeType : NodeEntityType
- $limit : int = 0
- $offset : int = 0
- $activeFilter : NodeActiveFilter = NodeActiveFilter::ONLY_GLOBAL_ACTIVE
Return values
NodeMemberCollectionfindAllByEntityIdsAndEntityType()
Finds all NodeMembers by their entity ID and entity type.
public
findAllByEntityIdsAndEntityType(array<int, int> $entityIds, MemberEntityType $entityType) : NodeMemberCollection
Parameters
- $entityIds : array<int, int>
- $entityType : MemberEntityType
Return values
NodeMemberCollectionfindAllByEntityIdsAndEntityTypeAndNodeType()
public
findAllByEntityIdsAndEntityTypeAndNodeType(array<string|int, mixed> $entityIds, MemberEntityType $entityType, NodeEntityType $nodeType) : NodeMemberCollection
Parameters
- $entityIds : array<string|int, mixed>
- $entityType : MemberEntityType
- $nodeType : NodeEntityType
Return values
NodeMemberCollectionfindAllByNodeId()
public
findAllByNodeId(int $nodeId[, bool $withAllChildNodes = false ][, int $limit = 100 ][, int $offset = 0 ][, bool $onlyActive = true ]) : NodeMemberCollection
Parameters
- $nodeId : int
- $withAllChildNodes : bool = false
- $limit : int = 100
- $offset : int = 0
- $onlyActive : bool = true
Return values
NodeMemberCollectionfindAllByNodeIdAndEntityType()
public
findAllByNodeIdAndEntityType(int $nodeId, MemberEntityType $entityType[, bool $withAllChildNodes = false ][, int $limit = 100 ][, int $offset = 0 ][, bool $onlyActive = true ]) : NodeMemberCollection
Parameters
- $nodeId : int
- $entityType : MemberEntityType
- $withAllChildNodes : bool = false
- $limit : int = 100
- $offset : int = 0
- $onlyActive : bool = true
Return values
NodeMemberCollectionfindAllByRoleIdAndNodeCollection()
public
findAllByRoleIdAndNodeCollection(int|null $roleId, NodeCollection $nodeCollection[, int $limit = 0 ][, int $offset = 0 ][, bool $ascendingSort = true ]) : NodeMemberCollection
Parameters
- $roleId : int|null
- $nodeCollection : NodeCollection
- $limit : int = 0
- $offset : int = 0
- $ascendingSort : bool = true
Return values
NodeMemberCollectionfindAllByRoleIdAndNodeId()
public
findAllByRoleIdAndNodeId(int|null $roleId, int|null $nodeId, int|null $limit, int|null $offset[, bool $ascendingSort = true ]) : NodeMemberCollection
Parameters
- $roleId : int|null
- $nodeId : int|null
- $limit : int|null
- $offset : int|null
- $ascendingSort : bool = true
Return values
NodeMemberCollectionfindAllByRoleIdAndStructureId()
public
findAllByRoleIdAndStructureId(int|null $roleId, int $structureId) : NodeMemberCollection
Parameters
- $roleId : int|null
- $structureId : int
Return values
NodeMemberCollectionfindByEntityTypeAndEntityIdAndNodeId()
public
findByEntityTypeAndEntityIdAndNodeId(MemberEntityType $entityType, int $entityId, int $nodeId) : NodeMember|null
Parameters
- $entityType : MemberEntityType
- $entityId : int
- $nodeId : int
Return values
NodeMember|nullfindById()
Finds a NodeMember by its ID.
public
findById(int $memberId) : NodeMember|null
Parameters
- $memberId : int
-
The ID of the NodeMember to find.
Return values
NodeMember|null —The found NodeMember object or null if not found.
findFirstByEntityIdAndEntityTypeAndNodeTypeAndActive()
Finds the first NodeMember by the given entity ID, entity type, node type, and active status.
public
findFirstByEntityIdAndEntityTypeAndNodeTypeAndActive(int $entityId, MemberEntityType $entityType, NodeEntityType $nodeType[, bool|null $active = null ]) : NodeMember|null
Parameters
- $entityId : int
- $entityType : MemberEntityType
- $nodeType : NodeEntityType
- $active : bool|null = null
Tags
Return values
NodeMember|nullgetCommonUsersFromRelation()
public
getCommonUsersFromRelation(RelationEntityType $entityType, int $entityId, array<string|int, mixed> $usersToCompare) : mixed
Parameters
- $entityType : RelationEntityType
- $entityId : int
- $usersToCompare : array<string|int, mixed>
remove()
public
remove(NodeMember $nodeMember) : bool
Parameters
- $nodeMember : NodeMember
Return values
boolremoveAllMembersByNodeId()
public
removeAllMembersByNodeId(int $nodeId) : void
Parameters
- $nodeId : int
Tags
removeByCollection()
public
removeByCollection(NodeMemberCollection $nodeMemberCollection) : bool
Parameters
- $nodeMemberCollection : NodeMemberCollection
Tags
Return values
boolsetActiveByEntityTypeAndEntityId()
public
setActiveByEntityTypeAndEntityId(MemberEntityType $entityType, int $entityId, bool $active) : Result
Parameters
- $entityType : MemberEntityType
- $entityId : int
- $active : bool
Return values
ResultsetActiveByEntityTypeAndEntityIds()
public
setActiveByEntityTypeAndEntityIds(MemberEntityType $entityType, array<int, int> $entityIds, bool $active) : Result
Parameters
- $entityType : MemberEntityType
- $entityIds : array<int, int>
- $active : bool
Return values
Resultupdate()
public
update(NodeMember $member) : NodeMember
Parameters
- $member : NodeMember
Tags
Return values
NodeMemberupdateByCollection()
public
updateByCollection(NodeMemberCollection $nodeMemberCollection) : NodeMemberCollection
Parameters
- $nodeMemberCollection : NodeMemberCollection