MIDDAG for Moodle

extensions_api_controller extends api_controller

Public SDK API Controller.

Extend this class to expose JSON-first endpoints that leverage the framework routing and middleware without touching Moodle globals directly.

Table of Contents

Properties

$extension_service  : extension_service_interface

Methods

__construct()  : mixed
list()  : JsonResponse
toggle()  : JsonResponse

Properties

Methods

list()

public list() : JsonResponse
Tags
throws
moodle_exception
Attributes
#[Route]
$path: '/extensions/list'
$name: 'extensions_list'
$methods: ['GET']
Return values
JsonResponse

toggle()

public toggle(mixed $extension) : JsonResponse
Parameters
$extension : mixed
Attributes
#[Route]
$path: '/extensions/{extension}/toggle'
$name: 'extensions_toggle'
$methods: ['POST']
Return values
JsonResponse

        
On this page

Search results