Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_courseformat\output\local\content\section Class Reference

Base class to render a course section. More...

Inheritance diagram for core_courseformat\output\local\content\section:
core\output\named_templatable renderable templatable format_topics\output\courseformat\content\section

Public Member Functions

 __construct (course_format $format, section_info $section)
 Constructor.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 
 get_template_name (\renderer_base $renderer)
 Get the name of the template to use for this templatable.
 
 hide_controls ()
 Hide the section controls.
 
 hide_title ()
 Hide the section title.
 

Protected Member Functions

 add_availability_data (stdClass &$data, renderer_base $output)
 Add the section availability to the data structure.
 
 add_cm_data (stdClass &$data, renderer_base $output)
 Add the section cm list to the data structure.
 
 add_editor_data (stdClass &$data, renderer_base $output)
 Add the section editor attributes to the data structure.
 
 add_format_data (stdClass &$data, array $haspartials, renderer_base $output)
 Add the section format attributes to the data structure.
 
 add_header_data (stdClass &$data, renderer_base $output)
 Add the section header to the data structure.
 
 add_visibility_data (stdClass &$data, renderer_base $output)
 Add the section vibility information to the data structure.
 
 is_section_collapsed ()
 Returns true if the current section should be shown collapsed.
 

Protected Attributes

section $availabilityclass
 availability output class
 
cm $cmlistclass
 list output class
 
activities $cmsummaryclass
 summary output class
 
section $controlclass
 control menu output class
 
string $controlmenuclass
 control menu class.
 
course_format $format
 the course format
 
section $headerclass
 header output class
 
bool $hidecontrols = false
 if the title is hidden for some reason
 
bool $hidetitle = false
 if the title is hidden for some reason
 
bool $isstealth = false
 if the section is considered stealth
 
optional $movehereclass
 move here output class
 
section_info $section
 the section info
 
section $summaryclass
 summary output class
 
optional $visibilityclass
 visibility output class
 

Detailed Description

Base class to render a course section.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_courseformat\output\local\content\section::__construct ( course_format $format,
section_info $section )

Constructor.

Parameters
course_format$formatthe course format
section_info$sectionthe section info

Member Function Documentation

◆ add_availability_data()

core_courseformat\output\local\content\section::add_availability_data ( stdClass & $data,
renderer_base $output )
protected

Add the section availability to the data structure.

Parameters
stdClass$datathe current cm data reference
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ add_cm_data()

core_courseformat\output\local\content\section::add_cm_data ( stdClass & $data,
renderer_base $output )
protected

Add the section cm list to the data structure.

Parameters
stdClass$datathe current cm data reference
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ add_editor_data()

core_courseformat\output\local\content\section::add_editor_data ( stdClass & $data,
renderer_base $output )
protected

Add the section editor attributes to the data structure.

Parameters
stdClass$datathe current cm data reference
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ add_format_data()

core_courseformat\output\local\content\section::add_format_data ( stdClass & $data,
array $haspartials,
renderer_base $output )
protected

Add the section format attributes to the data structure.

Parameters
stdClass$datathe current cm data reference
bool[]$haspartialsthe result of loading partial data elements
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ add_header_data()

core_courseformat\output\local\content\section::add_header_data ( stdClass & $data,
renderer_base $output )
protected

Add the section header to the data structure.

Parameters
stdClass$datathe current cm data reference
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ add_visibility_data()

core_courseformat\output\local\content\section::add_visibility_data ( stdClass & $data,
renderer_base $output )
protected

Add the section vibility information to the data structure.

Parameters
stdClass$datathe current cm data reference
renderer_base$outputtypically, the renderer that's calling this function
Return values
boolif the cm has name data

◆ export_for_template()

core_courseformat\output\local\content\section::export_for_template ( renderer_base $output)

Export this data so it can be used as the context for a mustache template.

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

Implements templatable.

◆ get_template_name()

core\output\named_templatable::get_template_name ( \renderer_base $renderer)
inherited

Get the name of the template to use for this templatable.

Parameters
renderer_base$rendererThe renderer requesting the template name
Return values
string

Implemented in core\output\local\dropdown\dialog, core\output\local\dropdown\status, core\output\sticky_footer, core_courseformat\output\local\content\cm\title, mod_quiz\output\list_of_attempts, and qbank_viewquestionname\output\questionname.

◆ hide_controls()

core_courseformat\output\local\content\section::hide_controls ( )

Hide the section controls.

This is used on blocks or in the home page where an isolated section is displayed.

◆ hide_title()

core_courseformat\output\local\content\section::hide_title ( )

Hide the section title.

This is used on blocks or in the home page where an isolated section is displayed.

◆ is_section_collapsed()

core_courseformat\output\local\content\section::is_section_collapsed ( )
protected

Returns true if the current section should be shown collapsed.

Return values
bool

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