class user_support extends facade mixin user_support

Facade for local_middag\framework\support\moodle\user_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 mixed
get_field_by_user(string|int $fieldidorshortname, ?int $userid = null)

No description

static array
get_options_for_user_fields(bool $includeemailfield = false)

No description

static array
get_all_profile_fields()

No description

static stdClass|false|null
get_user_field(int $fieldid, ?int $userid = null)

No description

static stdClass|int|false|null
get_user_field_data_by_shortname(string $shortname, ?int $userid = null)

No description

static void
save_profile_fields(int $userid, string|int $fieldidorshortname, string $value)

No description

void
static() $\local_middag\framework\domain\entity\moodle\user get_current()

No description

static int
create_user(stdClass $userobj, bool $updatepassword = false, bool $nologin = false)

No description

static void
update_user(stdClass $userobj, bool $updatepassword = true, bool $triggerevent = true)

No description

static bool
delete_user(stdClass $user)

No description

static string
fullname(user $user)

No description

static int
get_current_user_id()

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 50
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 45
static mixed get_field_by_user(string|int $fieldidorshortname, ?int $userid = null)

No description

Parameters

string|int $fieldidorshortname
?int $userid

Return Value

mixed

at line 45
static array get_options_for_user_fields(bool $includeemailfield = false)

No description

Parameters

bool $includeemailfield

Return Value

array

at line 45
static array get_all_profile_fields()

No description

Return Value

array

at line 45
static stdClass|false|null get_user_field(int $fieldid, ?int $userid = null)

No description

Parameters

int $fieldid
?int $userid

Return Value

stdClass|false|null

at line 45
static stdClass|int|false|null get_user_field_data_by_shortname(string $shortname, ?int $userid = null)

No description

Parameters

string $shortname
?int $userid

Return Value

stdClass|int|false|null

at line 45
static void save_profile_fields(int $userid, string|int $fieldidorshortname, string $value)

No description

Parameters

int $userid
string|int $fieldidorshortname
string $value

Return Value

void

at line 45
void static() $\local_middag\framework\domain\entity\moodle\user get_current()

No description

Parameters

) $\local_middag\framework\domain\entity\moodle\user get_current(

Return Value

void

at line 45
static int create_user(stdClass $userobj, bool $updatepassword = false, bool $nologin = false)

No description

Parameters

stdClass $userobj
bool $updatepassword
bool $nologin

Return Value

int

at line 45
static void update_user(stdClass $userobj, bool $updatepassword = true, bool $triggerevent = true)

No description

Parameters

stdClass $userobj
bool $updatepassword
bool $triggerevent

Return Value

void

at line 45
static bool delete_user(stdClass $user)

No description

Parameters

stdClass $user

Return Value

bool

at line 45
static string fullname(user $user)

No description

Parameters

user $user

Return Value

string

at line 45
static int get_current_user_id()

No description

Return Value

int