BadgeTwigExtension
class BadgeTwigExtension extends AbstractExtension (View source)
Constants
| private RECORD_TYPE_CLASSES |
|
| private ZONE_TYPE_CLASSES |
|
Methods
No description
No description
No description
Secondary and Consumer zones replicate records from a primary, so their records are read-only - templates hide edit controls for them.
Translate a raw PowerDNS zone kind to the user-visible label, swapping Master/Slave for Primary/Secondary on PowerDNS 4.5+ where the upstream adopted the modern terminology. The internal kind value passed to the API never changes - this only affects what the UI shows.
PowerDNS 4.6 renamed "supermaster" to "autoprimary" in its config and pdnsutil; the API still uses /supermasters but UIs surface the new term.
Build a PdnsCapabilities snapshot from the session-cached PowerDNS version. Indirected so tests can override behaviour by subclassing.
Details
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(string|null $type)
Translate a raw PowerDNS zone kind to the user-visible label, swapping Master/Slave for Primary/Secondary on PowerDNS 4.5+ where the upstream adopted the modern terminology. The internal kind value passed to the API never changes - this only affects what the UI shows.
string
getAutoprimariesLabel(string $key = 'plural')
PowerDNS 4.6 renamed "supermaster" to "autoprimary" in its config and pdnsutil; the API still uses /supermasters but UIs surface the new term.
Returns full strings (not composed at the template) so gettext can translate each variant as a single unit.
protected PdnsCapabilities
resolveCapabilities()
Build a PdnsCapabilities snapshot from the session-cached PowerDNS version. Indirected so tests can override behaviour by subclassing.