DbZoneGroupRepository
final class DbZoneGroupRepository implements ZoneGroupRepositoryInterface (View source)
SQL persistence for zone-to-group links in zones_groups; joins domains, or the zones table under the API backend.
Methods
No description
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.
Find all groups that own a zone
Owning groups of several zones in one query, for list pages.
Zones the group is granted, counting only grants that give access
Find all zones owned by a group
Remove a group from zone owners
Drop every group owner of a zone, when the zone is deleted.
Check if a group owns a zone
Details
__construct(PDO $db, ConfigurationInterface|null $config = null, bool $isApiBackend = false)
No description
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.
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.
int
countGrantedZones(int $groupId)
Zones the group is granted, counting only grants that give access
array
findByGroupId(int $groupId)
Find all zones owned by a group
ZoneGroup
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