interface controller_interface

Public contract for controllers executed by the MIDDAG Kernel.

Only methods that are intended to be callable from extensions and controller implementations are exposed here.

All protected methods from base_controller remain available through inheritance, but do not belong in the public contract.

Methods

void
handle()

Main lifecycle method executed by the Kernel or manually.

void
set_container(ContainerInterface $container)

Set the dependency injection container.

void
set_request(Request $request)

Set the current Symfony/Moodle request.

void
pre_handle()

Hook executed before rendering or JSON output.

void
set_require_login()

Require login before accessing a controller.

void
set_require_capabilities(array $capabilities)

Define capabilities that the user must have to access the controller.

Details

at line 36
void handle()

Main lifecycle method executed by the Kernel or manually.

Responsible for resolving context, authentication and page setup.

Return Value

void

at line 41
void set_container(ContainerInterface $container)

Set the dependency injection container.

Parameters

ContainerInterface $container

Return Value

void

at line 46
void set_request(Request $request)

Set the current Symfony/Moodle request.

Parameters

Request $request

Return Value

void

at line 52
void pre_handle()

Hook executed before rendering or JSON output.

Commonly used by controllers to run the full auth+context pipeline.

Return Value

void

at line 57
void set_require_login()

Require login before accessing a controller.

Return Value

void

at line 64
void set_require_capabilities(array $capabilities)

Define capabilities that the user must have to access the controller.

Parameters

array $capabilities

Return Value

void