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

Abstract factory for creating calendar events. More...

Inheritance diagram for core_calendar\local\event\factories\event_abstract_factory:
core_calendar\local\event\factories\event_factory_interface core_calendar\local\event\factories\event_factory

Public Member Functions

 __construct (callable $actioncallbackapplier, callable $visibilitycallbackapplier, callable $bailoutcheck, array &$coursecachereference, array &$modulecachereference)
 Constructor. More...
 
 create_instance (\stdClass $dbrow)
 Creates an instance of an event. More...
 

Protected Member Functions

 apply_component_action (event_interface $event)
 Applies component actions to the event. More...
 
 expose_event (event_interface $event)
 Exposes the event (or not). More...
 

Protected Attributes

callable $actioncallbackapplier
 $actioncallbackapplier Function to apply component action callbacks.
 
callable $bailoutcheck
 Bail out check for create_instance.
 
array $coursecachereference
 Course cache for use with get_course_cached.
 
array $modulecachereference
 Module cache reference for use with get_module_cached.
 
callable $visibilitycallbackapplier
 $visibilitycallbackapplier Function to apply component visibility callbacks.
 

Detailed Description

Abstract factory for creating calendar events.

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

Constructor & Destructor Documentation

◆ __construct()

core_calendar\local\event\factories\event_abstract_factory::__construct ( callable  $actioncallbackapplier,
callable  $visibilitycallbackapplier,
callable  $bailoutcheck,
array &  $coursecachereference,
array &  $modulecachereference 
)

Constructor.

Parameters
callable$actioncallbackapplierFunction to apply component action callbacks.
callable$visibilitycallbackapplierFunction to apply component visibility callbacks.
callable$bailoutcheckFunction to test if we can return null early.
array$coursecachereferenceCache to use with get_course_cached.
array$modulecachereferenceCache to use with get_module_cached.

Member Function Documentation

◆ apply_component_action()

core_calendar\local\event\factories\event_abstract_factory::apply_component_action ( event_interface  $event)
abstractprotected

Applies component actions to the event.

Parameters
event_interface$eventThe event to be updated.
Return values
event_interfaceThe potentially modified event.

Reimplemented in core_calendar\local\event\factories\event_factory.

◆ create_instance()

core_calendar\local\event\factories\event_abstract_factory::create_instance ( \stdClass  $dbrow)

Creates an instance of an event.

Parameters
stdClass$dbrowThe event row from the database.
Return values
core_calendar

Implements core_calendar\local\event\factories\event_factory_interface.

◆ expose_event()

core_calendar\local\event\factories\event_abstract_factory::expose_event ( event_interface  $event)
abstractprotected

Exposes the event (or not).

Parameters
event_interface$eventThe event to potentially expose.
Return values
event_interface|nullThe exposed event or null.

Reimplemented in core_calendar\local\event\factories\event_factory.


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