Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
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. More...
 
 create_instance (\stdClass $record)
 Creates an instance of an event. More...
 

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

Implements core_calendar\local\event\factories\event_factory_interface.


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