Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core_user\hook\extend_default_homepage Class Reference

Public Member Functions

 __construct (public bool readonly bool $userpreference=false,)
 Hook constructor.
 
 add_option (url $url, lang_string|string $title)
 To be called by callback to add an option.
 
 get_options ()
 Returns all added options.
 

Constructor & Destructor Documentation

◆ __construct()

core_user\hook\extend_default_homepage::__construct ( public bool readonly bool $userpreference = false)

Hook constructor.

Parameters
bool$userpreferenceWhether this is being selected as a user preference
Parameters
$userpreference$userpreference Whether this is being selected as a user preference

Member Function Documentation

◆ add_option()

core_user\hook\extend_default_homepage::add_option ( url $url,
lang_string|string $title )

To be called by callback to add an option.

Parameters
url$urlURL that can be used as a site homepage. Must be a local URL.
lang_string | string$title

◆ get_options()

core_user\hook\extend_default_homepage::get_options ( )

Returns all added options.

Return values
array

The documentation for this class was generated from the following file: