Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_courseformat\output\local\state\cm Class Reference
Inheritance diagram for core_courseformat\output\local\state\cm:
renderable

Public Member Functions

 __construct (course_format $format, section_info $section, cm_info $cm, bool $exportcontent=false)
 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.
 

Protected Attributes

cm_info $cm
 the course module to display
 
bool $exportcontent
 if cmitem HTML content must be exported as well
 
course_format $format
 the course format class
 
section_info $section
 the course section class
 

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
course_format$formatthe course format
section_info$sectionthe section data
cm_info$cmthe course module data
bool$exportcontent= false if pre-rendered cmitem must be exported.

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: