class url_support extends facade mixin url_support

Facade for local_middag\framework\support\moodle\url_support.

Properties

static protected array<string,object> $resolved_instances

The resolved object instances (cached roots).

from  abstract_facade
static protected bool $cached

Indicates if resolved instances should be cached.

from  abstract_facade

Methods

static mixed
__callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

static string
get_facade_accessor()

Return the service accessor key for this facade.

static object
get_facade_root()

Get the root object behind the facade.

static void
swap(object $instance)

Swap a given instance for testing or runtime overriding.

static void
clear_resolved_instance(string $name)

Clear one cached facade instance.

static void
clearresolved_instances()

Clear all cached facade instances.

static void
disable_cache()

Disable instance caching (useful for testing).

static void
enable_cache()

Enable instance caching.

static void
reset()

Reset the facade: clear cache and re-enable caching.

static object
resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

static moodle_url
get(moodle_url|string $url, ?array $params = null, ?string $anchor = null, int $strictness = IGNORE_MISSING)

No description

static moodle_url
course(int $courseid, array $params = [], ?string $anchor = null)

No description

static moodle_url
module(int $cmid, array $params = [], ?string $anchor = null)

No description

static moodle_url
user_profile(int $userid, ?int $courseid = null, array $params = [], ?string $anchor = null)

No description

static moodle_url
pluginfile(int $contextid, string $component, string $filearea, int $itemid, string $filepath, string $filename, bool $forcedownload = false, ?string $preview = null)

No description

static moodle_url
image_url(string $imagename, string $component = \local_middag\framework\support\middag_helper::COMPONENT_NAME)

No description

static moodle_url
admin_settings(string $section, array $params = [], ?string $anchor = null)

No description

static moodle_url
home(array $params = [], ?string $anchor = null)

No description

static moodle_url
dashboard(array $params = [], ?string $anchor = null)

No description

static moodle_url
grade_report(int $courseid, string $report = 'user', array $params = [], ?string $anchor = null)

No description

static string
to_absolute(string $relativeurl)

No description

static bool
is_external(string $url)

No description

static void
redirect(moodle_url|string $url, string $message = '', int $delay, string $messagetype = 'notifysuccess')

No description

Details

in abstract_facade at line 62
static mixed __callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

BadMethodCallException
RuntimeException

at line 48
static string get_facade_accessor()

Return the service accessor key for this facade.

Return Value

string

the service ID or class name

in abstract_facade at line 94
static object get_facade_root()

Get the root object behind the facade.

Return Value

object

in abstract_facade at line 104
static void swap(object $instance)

Swap a given instance for testing or runtime overriding.

Parameters

object $instance

Return Value

void

in abstract_facade at line 118
static void clear_resolved_instance(string $name)

Clear one cached facade instance.

Parameters

string $name

Return Value

void

in abstract_facade at line 126
static void clearresolved_instances()

Clear all cached facade instances.

Return Value

void

in abstract_facade at line 134
static void disable_cache()

Disable instance caching (useful for testing).

Return Value

void

in abstract_facade at line 143
static void enable_cache()

Enable instance caching.

Return Value

void

in abstract_facade at line 151
static void reset()

Reset the facade: clear cache and re-enable caching.

Return Value

void

in abstract_facade at line 168
static protected object resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

Parameters

string $name

service identifier or class name registered in the container

Return Value

object

Exceptions

RuntimeException

at line 43
static moodle_url get(moodle_url|string $url, ?array $params = null, ?string $anchor = null, int $strictness = IGNORE_MISSING)

No description

Parameters

moodle_url|string $url
?array $params
?string $anchor
int $strictness

Return Value

moodle_url

at line 43
static moodle_url course(int $courseid, array $params = [], ?string $anchor = null)

No description

Parameters

int $courseid
array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url module(int $cmid, array $params = [], ?string $anchor = null)

No description

Parameters

int $cmid
array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url user_profile(int $userid, ?int $courseid = null, array $params = [], ?string $anchor = null)

No description

Parameters

int $userid
?int $courseid
array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url pluginfile(int $contextid, string $component, string $filearea, int $itemid, string $filepath, string $filename, bool $forcedownload = false, ?string $preview = null)

No description

Parameters

int $contextid
string $component
string $filearea
int $itemid
string $filepath
string $filename
bool $forcedownload
?string $preview

Return Value

moodle_url

at line 43
static moodle_url image_url(string $imagename, string $component = \local_middag\framework\support\middag_helper::COMPONENT_NAME)

No description

Parameters

string $imagename
string $component

Return Value

moodle_url

at line 43
static moodle_url admin_settings(string $section, array $params = [], ?string $anchor = null)

No description

Parameters

string $section
array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url home(array $params = [], ?string $anchor = null)

No description

Parameters

array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url dashboard(array $params = [], ?string $anchor = null)

No description

Parameters

array $params
?string $anchor

Return Value

moodle_url

at line 43
static moodle_url grade_report(int $courseid, string $report = 'user', array $params = [], ?string $anchor = null)

No description

Parameters

int $courseid
string $report
array $params
?string $anchor

Return Value

moodle_url

at line 43
static string to_absolute(string $relativeurl)

No description

Parameters

string $relativeurl

Return Value

string

at line 43
static bool is_external(string $url)

No description

Parameters

string $url

Return Value

bool

at line 43
static void redirect(moodle_url|string $url, string $message = '', int $delay, string $messagetype = 'notifysuccess')

No description

Parameters

moodle_url|string $url
string $message
int $delay
string $messagetype

Return Value

void