class WhoisModule implements ModuleInterface (View source)

Methods

string
getName()

Get unique module identifier (e.g., 'csv_export', 'zone_import_export')

string
getDisplayName()

Get human-readable display name

string
getDescription()

Get short description of what the module does

array
getRoutes()

Get route definitions for this module.

array
getNavItems()

Get navigation items to add to the Tools dropdown.

array
getCapabilities()

Get list of capabilities this module provides.

array
getCapabilityData(string $capability)

Get data for a specific capability.

string
getTemplatePath()

Get the absolute path to the module's template directory.

string
getLocalePath()

Get the absolute path to the module's locale directory.

Details

string getName()

Get unique module identifier (e.g., 'csv_export', 'zone_import_export')

Return Value

string

string getDisplayName()

Get human-readable display name

Return Value

string

string getDescription()

Get short description of what the module does

Return Value

string

array getRoutes()

Get route definitions for this module.

Each route is an associative array with keys:

  • 'name' (string): Route name (e.g., 'module_csv_export')
  • 'path' (string): URL path (e.g., '/zones/{id}/export/csv')
  • 'controller' (string): Fully qualified controller class::method
  • 'methods' (array): HTTP methods (e.g., ['GET'])
  • 'requirements' (array, optional): Parameter regex constraints

Return Value

array

array getNavItems()

Get navigation items to add to the Tools dropdown.

Each item is an associative array with keys:

  • 'label' (string): Display text
  • 'url' (string): URL path
  • 'icon' (string): Bootstrap Icons class name (without 'bi-' prefix)
  • 'page_id' (string): Page identifier for active state detection
  • 'permission' (string, optional): Required permission to show this item

Return Value

array

array getCapabilities()

Get list of capabilities this module provides.

Known capabilities:

  • 'zone_export': Module provides zone export formats
  • 'zone_import': Module provides zone import functionality

Return Value

array

array getCapabilityData(string $capability)

Get data for a specific capability.

For 'zone_export', returns an array of export format definitions:

  • 'label' (string): Display text (e.g., 'CSV', 'Zone File')
  • 'url_pattern' (string): URL with {id} placeholder (e.g., '/zones/{id}/export/csv')
  • 'icon' (string): Bootstrap Icons class name (without 'bi-' prefix)

Parameters

string $capability

The capability identifier

Return Value

array

string getTemplatePath()

Get the absolute path to the module's template directory.

Return an empty string if the module has no templates.

Return Value

string

string getLocalePath()

Get the absolute path to the module's locale directory.

The directory should contain subdirectories per language (e.g., en_EN/messages.po). Return an empty string if the module has no translations.

Return Value

string