Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | List of all members
section_info Class Reference
Inheritance diagram for section_info:

Public Member Functions

 __construct ($data, $number, $notused1, $notused2, $modinfo, $notused3)
 Constructs object from database information plus extra required data. More...
 
 __empty ($name)
 Magic method to check if the property is empty. More...
 
 __get ($name)
 Magic method to retrieve the property, this is either basic section property or availability information or additional properties added by course format. More...
 
 __isset ($name)
 Magic method to check if the property is set. More...
 
 getIterator ()
 Implementation of IteratorAggregate::getIterator(), allows to cycle through properties and use convert_to_array(). More...
 

Static Public Member Functions

static convert_for_section_cache ($section)
 Prepares section data for inclusion in sectioncache cache, removing items that are set to defaults, and adding availability data if required. More...
 

Constructor & Destructor Documentation

◆ __construct()

section_info::__construct (   $data,
  $number,
  $notused1,
  $notused2,
  $modinfo,
  $notused3 
)

Constructs object from database information plus extra required data.

Parameters
object$dataArray entry from cached sectioncache
int$numberSection number (array key)
int$notused1argument not used (informaion is available in $modinfo)
int$notused2argument not used (informaion is available in $modinfo)
course_modinfo$modinfoOwner (needed for checking availability)
int$notused3argument not used (informaion is available in $modinfo)

Member Function Documentation

◆ __empty()

section_info::__empty (   $name)

Magic method to check if the property is empty.

Parameters
string$namename of the property
Return values
bool

◆ __get()

section_info::__get (   $name)

Magic method to retrieve the property, this is either basic section property or availability information or additional properties added by course format.

Parameters
string$namename of the property
Return values
bool

◆ __isset()

section_info::__isset (   $name)

Magic method to check if the property is set.

Parameters
string$namename of the property
Return values
bool

◆ convert_for_section_cache()

static section_info::convert_for_section_cache (   $section)
static

Prepares section data for inclusion in sectioncache cache, removing items that are set to defaults, and adding availability data if required.

Called by build_section_cache in course_modinfo only; do not use otherwise.

Parameters
object$sectionRaw section data object

◆ getIterator()

section_info::getIterator ( )

Implementation of IteratorAggregate::getIterator(), allows to cycle through properties and use convert_to_array().

Return values
ArrayIterator

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