MIDDAG for Moodle

extension_service_interface

Public contract for the Extension Service.

This interface exposes ONLY the operations that extensions, facades, controllers and external APIs are allowed to call.

Implemented by:

  • local_middag\application\common\extension_service

Wrapped by facade:

  • local_middag\facade\extension_service

Table of Contents

Constants

COMPONENT_NAME  = 'local_middag'

Methods

boot_all()  : void
Boot all enabled extensions.
disable()  : void
Disable an extension.
enable()  : void
Enable an extension.
get()  : null|extension_interface
Get an extension instance by slug.
get_active_extensions()  : array<string, extension_interface>
Get only the enabled extension instances indexed by slug.
get_all()  : array<string, extension_interface>
Get all extension instances (enabled or disabled) indexed by slug.
get_icon_url()  : moodle_url
Get the icon URL for an extension.
is_enabled()  : bool
Check whether an extension is enabled.
list_for_ui()  : array<int, array<string, mixed>>
Data prepared for UI rendering.

Constants

COMPONENT_NAME

public string COMPONENT_NAME = 'local_middag'

Component name used for cache definitions, logs, and file storage.

Methods

get_icon_url()

Get the icon URL for an extension.

public static get_icon_url(string $slug) : moodle_url
Parameters
$slug : string
Return values
moodle_url

is_enabled()

Check whether an extension is enabled.

public is_enabled(string $slug) : bool
Parameters
$slug : string
Return values
bool

list_for_ui()

Data prepared for UI rendering.

public list_for_ui() : array<int, array<string, mixed>>
Return values
array<int, array<string, mixed>>

        
On this page

Search results