Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
core\router\require_login Class Reference

Public Member Functions

 __construct (public bool bool $requirelogin=false, public bool bool $requirecourselogin=false, protected bool ?string $courseattributename=null, public bool bool $autologinguest=true,)
 Create a new instance of the metadata class.
 
 get_course_attribute_name ()
 Get the course attribute name.
 
 should_autologin_guest ()
 Whether automatic guest login is enabled.
 
 should_require_course_login ()
 Whether course login is required.
 
 should_require_login ()
 Whether login is required.
 

Constructor & Destructor Documentation

◆ __construct()

core\router\require_login::__construct ( public bool bool $requirelogin = false,
public bool bool $requirecourselogin = false,
protected bool ?string $courseattributename = null,
public bool bool $autologinguest = true )

Create a new instance of the metadata class.

Parameters
bool$requireloginWhether login is required
bool$requirecourseloginWhether a course login is required
mixed$courseattributenameThe name of the route attribute that the course object can be found in
bool$autologinguestWhether to automatically log in as guest
Exceptions
InvalidArgumentException
Parameters
$requireloginWhether login is required
$requirecourseloginWhether a course login is required
$courseattributenameThe name of the route attribute that the course object can be found in
$autologinguestWhether to automatically log in as guest

Member Function Documentation

◆ get_course_attribute_name()

core\router\require_login::get_course_attribute_name ( )

Get the course attribute name.

Return values
string

◆ should_autologin_guest()

core\router\require_login::should_autologin_guest ( )

Whether automatic guest login is enabled.

Return values
bool

◆ should_require_course_login()

core\router\require_login::should_require_course_login ( )

Whether course login is required.

Return values
bool

◆ should_require_login()

core\router\require_login::should_require_login ( )

Whether login is required.

Return values
bool

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