Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
core_calendar\local\event\entities\repeat_event_collection Class Reference

Class representing a collection of repeat events. More...

Inheritance diagram for core_calendar\local\event\entities\repeat_event_collection:
core_calendar\local\event\entities\event_collection_interface

Public Member Functions

 __construct ($dbrow, event_factory_interface $factory)
 Constructor. More...
 
 get_id ()
 Get the event collection's ID. More...
 
 get_num ()
 Get the total number of repeats in the collection. More...
 
 getIterator ()
 

Public Attributes

int const DB_QUERY_LIMIT = 100
 DB_QUERY_LIMIT How many records to pull from the DB at once.
 

Protected Member Functions

 get_parent_record ()
 Return the parent DB record. More...
 
 load_event_records ($start=0)
 Generate more event records. More...
 

Protected Attributes

event_factory_interface $factory
 $factory Event factory.
 
int $num
 $num Total number of events that could be retrieved by this collection.
 
int $parentid
 $parentid The ID of the event which the events in this collection are repeats of.
 
stdClass $parentrecord
 $parentrecord The parent event record from the database.
 

Detailed Description

Class representing a collection of repeat events.

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

Constructor & Destructor Documentation

◆ __construct()

core_calendar\local\event\entities\repeat_event_collection::__construct (   $dbrow,
event_factory_interface  $factory 
)

Constructor.

Parameters
stdClass$dbrowThe event dbrow that is being repeated.
event_factory_interface$factoryEvent factory.

Member Function Documentation

◆ get_id()

core_calendar\local\event\entities\repeat_event_collection::get_id ( )

Get the event collection's ID.

Return values
int

Implements core_calendar\local\event\entities\event_collection_interface.

◆ get_num()

core_calendar\local\event\entities\repeat_event_collection::get_num ( )

Get the total number of repeats in the collection.

Return values
int

Implements core_calendar\local\event\entities\event_collection_interface.

◆ get_parent_record()

core_calendar\local\event\entities\repeat_event_collection::get_parent_record ( )
protected

Return the parent DB record.

Return values
stdClass

◆ load_event_records()

core_calendar\local\event\entities\repeat_event_collection::load_event_records (   $start = 0)
protected

Generate more event records.

Parameters
int$startStart offset.
Return values
stdClass[]

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