MIDDAG for Moodle

url_generator

Trait url_generator.

Provides STATIC helper methods to generate URLs via the Kernel. Useful for Facades, Utils, or classes that are not instantiated via Container.

Table of Contents

Methods

url_generator()  : moodle_url
Generate a URL based on the Symfony route name and parameters.
webhook_url_generator()  : moodle_url
Generate a webhook URL.

Methods

url_generator()

Generate a URL based on the Symfony route name and parameters.

public static url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
$route : string
$parameters : array<string|int, mixed> = []
$referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Return values
moodle_url

webhook_url_generator()

Generate a webhook URL.

public static webhook_url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
$route : string
$parameters : array<string|int, mixed> = []
$referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Tags
throws
moodle_exception
Return values
moodle_url

        
On this page

Search results