extension_interface
Contract that all MIDDAG extensions must implement.
Extensions act as micro-plugins within the MIDDAG ecosystem.
Table of Contents
Methods
- boot() : void
- Execution logic called after the Kernel has compiled.
- get_config_page_url() : moodle_url
- Return configuration URL.
- get_dependencies() : array<string|int, string>
- Get the list of dependencies (slugs) required by this extension.
- get_description() : string
- Return the extension description (localized).
- get_extension_badges() : array<string|int, string>
- Return UI badges.
- get_group() : extension_group
- Get the group classification for this extension.
- get_label() : string
- Get the human-readable label.
- get_name() : string
- Get the unique machine name of the extension (e.g., 'certificate', 'payment').
- get_title() : string
- Return the extension title (localized).
- get_version() : string
- Get the current version of the extension.
- has_moodle_settings() : bool
- Does this extension provide settings pages?
- is_available() : bool
- Returns true if the resource is technically available (dependencies met).
- is_core() : bool
- Check if this is the core system extension.
- is_enabled() : bool
- Check if the extension is enabled in the database/config.
- is_enabled_internally() : bool
- Internal check for hardcoded enabling/disabling logic.
- register() : void
- Register services into the DI container during Kernel boot.
Methods
boot()
Execution logic called after the Kernel has compiled.
public
boot() : void
Used to register hooks, event listeners, etc.
get_config_page_url()
Return configuration URL.
public
get_config_page_url() : moodle_url
Return values
moodle_urlget_dependencies()
Get the list of dependencies (slugs) required by this extension.
public
get_dependencies() : array<string|int, string>
Return values
array<string|int, string>get_description()
Return the extension description (localized).
public
get_description() : string
Return values
stringget_extension_badges()
Return UI badges.
public
get_extension_badges() : array<string|int, string>
Return values
array<string|int, string>get_group()
Get the group classification for this extension.
public
get_group() : extension_group
Return values
extension_groupget_label()
Get the human-readable label.
public
get_label() : string
Return values
stringget_name()
Get the unique machine name of the extension (e.g., 'certificate', 'payment').
public
get_name() : string
Return values
stringget_title()
Return the extension title (localized).
public
get_title() : string
Return values
stringget_version()
Get the current version of the extension.
public
get_version() : string
Return values
stringhas_moodle_settings()
Does this extension provide settings pages?
public
has_moodle_settings() : bool
Return values
boolis_available()
Returns true if the resource is technically available (dependencies met).
public
is_available() : bool
Return values
boolis_core()
Check if this is the core system extension.
public
is_core() : bool
Return values
boolis_enabled()
Check if the extension is enabled in the database/config.
public
is_enabled() : bool
Return values
boolis_enabled_internally()
Internal check for hardcoded enabling/disabling logic.
public
is_enabled_internally() : bool
Return values
boolregister()
Register services into the DI container during Kernel boot.
public
register(ContainerInterface $container) : void
This replaces the old 'bootstrap.php' logic partially.
Parameters
- $container : ContainerInterface