ZoneGroupService
class ZoneGroupService (View source)
Assigns zones to groups and removes them; the group-based half of zone ownership.
Handles assigning groups as zone owners
Constants
| private SHARED_ZONE_ID |
|
Methods
No description
Add a group as zone owner
Remove a group from zone owners. The guard answers before the group lookup so a refusal outranks a missing group, as the API contract orders them.
List all groups that own a zone
List all zones owned by a group
Add multiple zones to a group
Remove multiple zones from a group. A zone whose last allowed owner is
this group stays assigned and is reported in failed with the reason.
Check if a group owns a zone
Get zones that will be affected when a group is deleted
Details
__construct(ZoneGroupRepositoryInterface $zoneGroupRepository, UserGroupLookupInterface $groupRepository, ZoneOwnershipGuard $ownershipGuard, ZoneOwnershipLimit|null $ownershipLimit = null)
No description
ZoneGroup|ZoneLimitBreach
addGroupToZone(int $domainId, int $groupId)
Add a group as zone owner
bool|ZoneOwnershipRefusal
removeGroupFromZone(int $domainId, int $groupId)
Remove a group from zone owners. The guard answers before the group lookup so a refusal outranks a missing group, as the API contract orders them.
array
listZoneOwners(int $domainId)
List all groups that own a zone
array
listGroupZones(int $groupId)
List all zones owned by a group
array
bulkAddZones(int $groupId, array $domainIds)
Add multiple zones to a group
array
bulkRemoveZones(int $groupId, array $domainIds)
Remove multiple zones from a group. A zone whose last allowed owner is
this group stays assigned and is reported in failed with the reason.
bool
isGroupOwner(int $domainId, int $groupId)
Check if a group owns a zone
array
getGroupDeletionImpact(int $groupId, int $limit = 20)
Get zones that will be affected when a group is deleted