class enrolment_extension extends extension

Constants

EXTENSION_IDNUMBER

GROUP

REQUIRES

List of other extension slugs required for this one to function.

PRIORITY

HIDDEN

Whether this extension should be hidden from general UI listings.

Methods

__construct()

No description

void
register(ContainerInterface $container)

DI Registration Phase.

void
boot()

Runtime Boot Phase.

bool
is_core()

Check if the extension is the core component.

bool
is_enabled()

Checks if the extension is effectively enabled (Config + Internal).

bool
is_enabled_internally()

Internal check (e.g., license check or deprecated status).

bool
is_hidden()

Returns whether the extension is flagged as hidden.

string
get_name()

Get the name of the extension.

string
get_label()

Get the human-readable label of the extension.

string
get_version()

Get the current version of the extension.

array
get_dependencies()

Get the list of extension slugs required for this extension to operate.

string
get_title()

Get the title of the extension.

string
get_description()

Get the description of the extension.

static string
get_type()

Get the type of the extension.

string
get_icon()

Returns the icon slug for this extension.

array
get_categories()

Get the categories of the extension.

extension_group
get_group()

Extension group for UI organization in settings tabs.

bool
has_moodle_settings()

Whether this extension provides Moodle settings to be rendered dynamically.

bool
is_available()

Check if the resource is available.

array
get_extension_badges()

Get the badges associated with the extension.

moodle_url
get_config_page_url()

Get the configuration page URL for the extension.

array
get_quick_access_links()

Quick access links for this extension (admin shortcuts).

string
get_help_url()

Get the help URL of the extension.

string
get_custom_help_url()

Get the custom help URL of the extension.

void
before_render()

Before element rendering.

void
after_render()

After element rendering.

void
register_controllers()

Register controllers via Attributes/Annotations.

void
register_hooks()

Load hooks for this specific extension.

array
get_settings_pages()

Return admin setting pages for dynamic settings registration.

string
get_config_page_title()

Get the localized title for the configuration page tab.

array
get_controllers()

Auto-discover controllers in the 'controller' subfolder.

Details

in abstract_extension at line 72
__construct()

No description

in abstract_extension at line 84
void register(ContainerInterface $container)

DI Registration Phase.

Override this to define services in the ContainerBuilder before compilation.

Parameters

ContainerInterface $container

Return Value

void

in abstract_extension at line 94
void boot()

Runtime Boot Phase.

Called after the container is compiled. Used to register Routes, Hooks (Events), and other runtime logic.

Return Value

void

in abstract_extension at line 119
bool is_core()

Check if the extension is the core component.

Return Value

bool

in abstract_extension at line 129
bool is_enabled()

Checks if the extension is effectively enabled (Config + Internal).

Return Value

bool

in abstract_extension at line 147
bool is_enabled_internally()

Internal check (e.g., license check or deprecated status).

Return Value

bool

in abstract_extension at line 157
bool is_hidden()

Returns whether the extension is flagged as hidden.

Return Value

bool

True if the extension should be hidden from general listings

in abstract_extension at line 167
string get_name()

Get the name of the extension.

Return Value

string

in abstract_extension at line 178
string get_label()

Get the human-readable label of the extension.

Return Value

string

in abstract_extension at line 188
string get_version()

Get the current version of the extension.

Return Value

string

in abstract_extension at line 199
array get_dependencies()

Get the list of extension slugs required for this extension to operate.

Return Value

array

in abstract_extension at line 211
string get_title()

Get the title of the extension.

Return Value

string

in abstract_extension at line 225
string get_description()

Get the description of the extension.

Return Value

string

in abstract_extension at line 239
static string get_type()

Get the type of the extension.

Return Value

string

the type of the extension

at line 35
string get_icon()

Returns the icon slug for this extension.

Return Value

string

the icon of the extension

in abstract_extension at line 259
array get_categories()

Get the categories of the extension.

Return Value

array

the categories of the extension

in abstract_extension at line 274
extension_group get_group()

Extension group for UI organization in settings tabs.

Discovery uses the static GROUP constant to avoid instantiation. At runtime, this method returns the same value, enabling subclasses to simply define public const GROUP = self::GROUP_*; without the need to override this method.

Return Value

extension_group

in abstract_extension at line 283
bool has_moodle_settings()

Whether this extension provides Moodle settings to be rendered dynamically.

If true, settings.php may build a tab for it.

Return Value

bool

at line 45
bool is_available()

Check if the resource is available.

Return Value

bool

at line 57
array get_extension_badges()

Get the badges associated with the extension.

severity: secondary, success, info, warn, danger, contrast label: name.

Return Value

array

in abstract_extension at line 318
moodle_url get_config_page_url()

Get the configuration page URL for the extension.

Return Value

moodle_url

Quick access links for this extension (admin shortcuts).

Return an array of DTOs: each item as [ 'id' => string (unique), 'title' => string (Already localized), 'url' => moodle_url|string ].

settings.php will render them inside a dedicated tab if non-empty.

Return Value

array

in abstract_extension at line 345
string get_help_url()

Get the help URL of the extension.

Return Value

string

the help URL of the extension

in abstract_extension at line 355
string get_custom_help_url()

Get the custom help URL of the extension.

Return Value

string

the custom help URL of the extension

in abstract_extension at line 365
void before_render()

Before element rendering.

Used to add stuff before the element.

Return Value

void

in abstract_extension at line 372
void after_render()

After element rendering.

Used to add stuff after the element.

Return Value

void

in abstract_extension at line 381
void register_controllers()

Register controllers via Attributes/Annotations.

Uses Middag routing helper to map PHP 8 #[Route] attributes.

Return Value

void

in abstract_extension at line 394
void register_hooks()

Load hooks for this specific extension.

Scans the hook/ subdirectory for classes with a static register() method.

Return Value

void

in abstract_extension at line 432
array get_settings_pages()

Return admin setting pages for dynamic settings registration.

Return Value

array

array of Moodle settings pages

in abstract_extension at line 442
string get_config_page_title()

Get the localized title for the configuration page tab.

Return Value

string

settings page title

in abstract_extension at line 458
protected array get_controllers()

Auto-discover controllers in the 'controller' subfolder.

Return Value

array

Array of FQCN controller classes