interface ZoneGroupRepositoryInterface (View source)

Persistence for group-based zone ownership.

Methods

array
findByDomainId(int $domainId)

Find all groups that own a zone

array
findGroupIdsByDomainIds(array $domainIds)

Owning groups of several zones in one query, for list pages.

array
findByGroupId(int $groupId)

Find all zones owned by a group

void
lockZoneGroups(int $domainId)

Lock the zone's group rows for the rest of the open transaction, so a concurrent removal waits instead of deciding on stale group counts.

add(int $domainId, int $groupId)

Add a group as zone owner

bool
remove(int $domainId, int $groupId)

Remove a group from zone owners

void
removeAllForDomain(int $domainId)

Drop every group owner of a zone, when the zone is deleted.

bool
exists(int $domainId, int $groupId)

Check if a group owns a zone

int
countGrantedZones(int $groupId)

Zones the group is granted, counting only grants that give access

Details

array findByDomainId(int $domainId)

Find all groups that own a zone

Parameters

int $domainId

Return Value

array

array findGroupIdsByDomainIds(array $domainIds)

Owning groups of several zones in one query, for list pages.

Parameters

array $domainIds

Return Value

array

Zone id => group ids; zones without a group are absent

array findByGroupId(int $groupId)

Find all zones owned by a group

Parameters

int $groupId

Return Value

array

void lockZoneGroups(int $domainId)

Lock the zone's group rows for the rest of the open transaction, so a concurrent removal waits instead of deciding on stale group counts.

Parameters

int $domainId

Return Value

void

ZoneGroup add(int $domainId, int $groupId)

Add a group as zone owner

Parameters

int $domainId
int $groupId

Return Value

ZoneGroup

bool remove(int $domainId, int $groupId)

Remove a group from zone owners

Parameters

int $domainId
int $groupId

Return Value

bool

void removeAllForDomain(int $domainId)

Drop every group owner of a zone, when the zone is deleted.

Parameters

int $domainId

Return Value

void

bool exists(int $domainId, int $groupId)

Check if a group owns a zone

Parameters

int $domainId
int $groupId

Return Value

bool

int countGrantedZones(int $groupId)

Zones the group is granted, counting only grants that give access

Parameters

int $groupId

Return Value

int