class course_support extends facade mixin course_support

Facade for local_middag\framework\support\moodle\course_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.

void
static() $string get_course_format(int $courseid)

No description

static array
get_courses_options()

No description

static array
static array
get_cms_by_section(int $courseid, int $sectionnumber)

No description

static array
get_courses_from_categoryid(int $categoryid, bool $includesub = true)

No description

static moodle_url
get_course_url(int $courseid, ?int $sectionid = null, ?string $anchor = null)

No description

static bool
is_course_visible(int $courseid)

No description

static array
get_course_modules(int $courseid, ?string $modname = null)

No description

static int
get_enrolled_users_count(int $courseid, ?bool $activeonly = true, ?int $groupid = null)

No description

static bool
is_user_enrolled(int $courseid, int $userid)

No description

static moodle_url
course_group_viewurl()

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 51
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 46
void static() $string get_course_format(int $courseid)

No description

Parameters

) $string get_course_format(int $courseid

Return Value

void

at line 46
static array get_courses_options()

No description

Return Value

array

at line 46
static array get_course_with_contextid_options()

No description

Return Value

array

at line 46
static array get_cms_by_section(int $courseid, int $sectionnumber)

No description

Parameters

int $courseid
int $sectionnumber

Return Value

array

at line 46
static array get_courses_from_categoryid(int $categoryid, bool $includesub = true)

No description

Parameters

int $categoryid
bool $includesub

Return Value

array

at line 46
static moodle_url get_course_url(int $courseid, ?int $sectionid = null, ?string $anchor = null)

No description

Parameters

int $courseid
?int $sectionid
?string $anchor

Return Value

moodle_url

at line 46
static bool is_course_visible(int $courseid)

No description

Parameters

int $courseid

Return Value

bool

at line 46
static array get_course_modules(int $courseid, ?string $modname = null)

No description

Parameters

int $courseid
?string $modname

Return Value

array

at line 46
static int get_enrolled_users_count(int $courseid, ?bool $activeonly = true, ?int $groupid = null)

No description

Parameters

int $courseid
?bool $activeonly
?int $groupid

Return Value

int

at line 46
static bool is_user_enrolled(int $courseid, int $userid)

No description

Parameters

int $courseid
int $userid

Return Value

bool

at line 46
static moodle_url course_group_viewurl()

No description

Return Value

moodle_url