company_extension
class company_extension extends extension
Constants
| EXTENSION_IDNUMBER |
|
| GROUP |
|
| REQUIRES |
List of other extension slugs required for this one to function. |
| DISTRIBUTION |
Distribution model for this extension. Identifies the origin and commercial model:
|
| PRIORITY |
|
| HIDDEN |
Whether this extension should be hidden from general UI listings. |
Methods
Checks if the extension is effectively enabled (Config + Internal).
Internal check (e.g., license check or deprecated status).
Get the list of extension slugs required for this extension to operate.
Returns the icon slug for this extension.
Extension group for UI organization in settings tabs.
Whether this extension provides Moodle settings to be rendered dynamically.
Get the configuration page URL for the extension.
Quick access links for this extension (admin shortcuts).
Register controllers via Attributes/Annotations.
Return admin setting pages for dynamic settings registration.
Get the localized title for the configuration page tab.
Get the list of Moodle events this extension is interested in.
Auto-discover controllers in the 'controller' subfolder.
Details
in
abstract_extension at line 83
__construct()
No description
in
abstract_extension at line 95
void
register(ContainerInterface $container)
DI Registration Phase.
Override this to define services in the ContainerBuilder before compilation.
in
abstract_extension at line 105
void
boot()
Runtime Boot Phase.
Called after the container is compiled. Used to register Routes, Hooks (Events), and other runtime logic.
in
abstract_extension at line 130
bool
is_core()
Check if the extension is the core component.
in
abstract_extension at line 140
bool
is_enabled()
Checks if the extension is effectively enabled (Config + Internal).
in
abstract_extension at line 158
bool
is_enabled_internally()
Internal check (e.g., license check or deprecated status).
in
abstract_extension at line 168
bool
is_hidden()
Returns whether the extension is flagged as hidden.
in
abstract_extension at line 178
string
get_name()
Get the name of the extension.
in
abstract_extension at line 189
string
get_label()
Get the human-readable label of the extension.
in
abstract_extension at line 199
string
get_version()
Get the current version of the extension.
in
abstract_extension at line 210
array
get_dependencies()
Get the list of extension slugs required for this extension to operate.
in
abstract_extension at line 222
string
get_title()
Get the title of the extension.
in
abstract_extension at line 236
string
get_description()
Get the description of the extension.
in
abstract_extension at line 250
static string
get_type()
Get the type of the extension.
at line 34
string
get_icon()
Returns the icon slug for this extension.
in
abstract_extension at line 270
array
get_categories()
Get the categories of the extension.
in
abstract_extension at line 285
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.
in
abstract_extension at line 294
bool
has_moodle_settings()
Whether this extension provides Moodle settings to be rendered dynamically.
If true, settings.php may build a tab for it.
in
abstract_extension at line 304
bool
is_available()
Check if the resource is available.
in
abstract_extension at line 319
array
get_extension_badges()
Get the badges associated with the extension.
severity: secondary, success, info, warn, danger, contrast label: name.
Get UI badges (New, Beta, Pro, etc.). Format: [['severity' => 'success', 'label' => 'New']].
in
abstract_extension at line 329
moodle_url
get_config_page_url()
Get the configuration page URL for the extension.
in
abstract_extension at line 346
array
get_quick_access_links()
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.
in
abstract_extension at line 356
string
get_help_url()
Get the help URL of the extension.
in
abstract_extension at line 366
string
get_custom_help_url()
Get the custom help URL of the extension.
in
abstract_extension at line 376
void
before_render()
Before element rendering.
Used to add stuff before the element.
in
abstract_extension at line 383
void
after_render()
After element rendering.
Used to add stuff after the element.
in
abstract_extension at line 392
void
register_controllers()
Register controllers via Attributes/Annotations.
Uses Middag routing helper to map PHP 8 #[Route] attributes.
in
abstract_extension at line 405
void
register_hooks()
Load hooks for this specific extension.
Scans the hook/ subdirectory for classes with a static register() method.
in
abstract_extension at line 443
array
get_settings_pages()
Return admin setting pages for dynamic settings registration.
in
abstract_extension at line 453
string
get_config_page_title()
Get the localized title for the configuration page tab.
in
abstract_extension at line 469
array
get_moodle_events()
Get the list of Moodle events this extension is interested in.
in
abstract_extension at line 479
protected array
get_controllers()
Auto-discover controllers in the 'controller' subfolder.