final class BadgeTwigExtension extends AbstractExtension (View source)

Twig functions for record and zone type badge classes, zone type labels and the autoprimaries wording.

Constants

private RECORD_TYPE_CLASSES

private ZONE_TYPE_CLASSES

Methods

array
getFunctions()

No description

string
getRecordTypeClass(string|null $type)

No description

string
getZoneTypeClass(string $type)

No description

bool
isZoneReadOnly(string|null $type)

Secondary and Consumer zones replicate records from a primary, so their records are read-only - templates hide edit controls for them.

string
getZoneTypeLabel(array $context, string|null $type)

No description

string
getAutoprimariesLabel(array $context, string $key = 'plural')

No description

Details

array getFunctions()

No description

Return Value

array

string getRecordTypeClass(string|null $type)

No description

Parameters

string|null $type

Return Value

string

string getZoneTypeClass(string $type)

No description

Parameters

string $type

Return Value

string

bool isZoneReadOnly(string|null $type)

Secondary and Consumer zones replicate records from a primary, so their records are read-only - templates hide edit controls for them.

Parameters

string|null $type

Return Value

bool

string getZoneTypeLabel(array $context, string|null $type)

No description

Parameters

array $context

The Twig context; reads the pdns_caps global

string|null $type

Return Value

string

string getAutoprimariesLabel(array $context, string $key = 'plural')

No description

Parameters

array $context

The Twig context; reads the pdns_caps global

string $key

Return Value

string