MIDDAG for Moodle

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.

Table of Contents

Methods

handle()  : void
Main lifecycle method executed by the Kernel or manually.
pre_handle()  : void
Hook executed before rendering or JSON output.
set_container()  : void
Set the dependency injection container.
set_request()  : void
Set the current Symfony/Moodle request.
set_require_capabilities()  : void
Define capabilities that the user must have to access the controller.
set_require_login()  : void
Require login before accessing a controller.

Methods

handle()

Main lifecycle method executed by the Kernel or manually.

public handle() : void

Responsible for resolving context, authentication and page setup.

pre_handle()

Hook executed before rendering or JSON output.

public pre_handle() : void

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

set_container()

Set the dependency injection container.

public set_container(ContainerInterface $container) : void
Parameters
$container : ContainerInterface

set_request()

Set the current Symfony/Moodle request.

public set_request(Request $request) : void
Parameters
$request : Request

set_require_capabilities()

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

public set_require_capabilities(array<int, string> $capabilities) : void
Parameters
$capabilities : array<int, string>

set_require_login()

Require login before accessing a controller.

public set_require_login() : void

        
On this page

Search results