Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
action_event_test_factory Class Reference

A test factory that will create action events. More...

Inheritance diagram for action_event_test_factory:
core_calendar\local\event\factories\event_factory_interface

Public Member Functions

 __construct ($callback=null)
 A test factory that will create action events.
 
 create_instance (\stdClass $record)
 Creates an instance of an event.
 

Detailed Description

A test factory that will create action events.

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

Constructor & Destructor Documentation

◆ __construct()

action_event_test_factory::__construct ( $callback = null)

A test factory that will create action events.

The factory accepts a callback that will be used to determine if the event should be returned or not.

The callback will be given the event and should return true if the event should be returned and false otherwise.

Parameters
callable$callbackThe callback.

Member Function Documentation

◆ create_instance()

action_event_test_factory::create_instance ( \stdClass $dbrow)

Creates an instance of an event.

Parameters
stdClass$dbrowThe event row from the database.
Return values
core_calendar\local\event\entities\event_interface

Implements core_calendar\local\event\factories\event_factory_interface.


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