Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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: