◆ __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. |
◆ 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 | $output | typically, the renderer that's calling this function |
- Return values
-
stdClass | data 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
-
bool | if the activity has visible restrictions for the user. |
The documentation for this class was generated from the following file:
- course/format/classes/output/local/state/cm.php