class ZoneCreateService (View source)

The zone creation flow shared by the add-zone forms, bulk registration and the secondary zone import: the name is normalised the same way, the owner controls are resolved by the same rules, the zone is created and audited the same way, and every refusal is worded for the form.

Methods

__construct(ZoneOwnershipFormResolver $ownership, ZoneManagementService $zones, ApiPermissionService $permissions, AuditService $audit)

No description

create(ZoneCreateRequest $request)

No description

createMany(ZoneCreateRequest $request, array $names)

Creates one zone per name with the request's kind, template and owners.

Details

__construct(ZoneOwnershipFormResolver $ownership, ZoneManagementService $zones, ApiPermissionService $permissions, AuditService $audit)

No description

Parameters

ZoneOwnershipFormResolver $ownership
ZoneManagementService $zones
ApiPermissionService $permissions
AuditService $audit

ZoneCreateOutcome create(ZoneCreateRequest $request)

No description

Parameters

ZoneCreateRequest $request

Return Value

ZoneCreateOutcome

ZoneBatchCreateOutcome createMany(ZoneCreateRequest $request, array $names)

Creates one zone per name with the request's kind, template and owners.

The owners are resolved once; a refusal there stops the batch before any name is tried, while a refused name only fails that name.

Parameters

ZoneCreateRequest $request
array $names

Return Value

ZoneBatchCreateOutcome