Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_courseformat\output\local\state\cm Class Reference
Inheritance diagram for core_courseformat\output\local\state\cm:
renderable

Public Member Functions

 __construct (protected course_format course_format $format, protected section_info section_info $section, protected cm_info cm_info $cm, protected bool bool $exportcontent=false, protected ?bool ?bool $istrackeduser=null,)
 Constructor.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as state object in the course editor.
 

Protected Member Functions

 get_has_restrictions ()
 Return if the activity has a restrictions icon displayed or not.
 

Constructor & Destructor Documentation

◆ __construct()

core_courseformat\output\local\state\cm::__construct ( protected course_format course_format $format,
protected section_info section_info $section,
protected cm_info cm_info $cm,
protected bool bool $exportcontent = false,
protected ?bool ?bool $istrackeduser = null )

Constructor.

Parameters
$format$format The course format.
$section$section The section data.
$cm$cm The course module data.
$exportcontent$exportcontent False if pre-rendered cmitem HTML content must be exported.
$istrackeduser$istrackeduser If is_tracked_user is pre-computed for this CM's course, it can be provided here.

Member Function Documentation

◆ export_for_template()

core_courseformat\output\local\state\cm::export_for_template ( renderer_base $output)

Export this data so it can be used as state object in the course editor.

Parameters
renderer_base$outputtypically, the renderer that's calling this function
Return values
stdClassdata context for a mustache template

◆ get_has_restrictions()

core_courseformat\output\local\state\cm::get_has_restrictions ( )
protected

Return if the activity has a restrictions icon displayed or not.

Return values
boolif the activity has visible restrictions for the user.

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