Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

New event manager class.

Copyright: 2013 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 359 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: manager  - X-Ref

Class used for event dispatching.

Note: Do NOT use directly in your code, it is intended to be used from
base event class only.
dispatch(\core\event\base $event)   X-Ref
Trigger new event.

param: \core\event\base $event

database_transaction_commited()   X-Ref
Notification from DML layer.


database_transaction_rolledback()   X-Ref
Notification from DML layer.


process_buffers()   X-Ref
No description

get_observing_classes(\core\event\base $event)   X-Ref
Returns list of classes related to this event.

param: \core\event\base $event
return: array

init_all_observers()   X-Ref
Initialise the list of observers.


add_observers(array $observers, $file, $plugintype = null, $plugin = null)   X-Ref
Add observers.

param: array $observers
param: string $file
param: string $plugintype Plugin type of the observer.
param: string $plugin Plugin of the observer.

order_all_observers()   X-Ref
Reorder observers to allow quick lookup of observer for each event.


get_all_observers()   X-Ref
Returns all observers in the system. This is only for use for reporting on the list of observers in the system.

return: array An array of stdClass with all core observer details.

phpunit_replace_observers(array $observers)   X-Ref
Replace all standard observers.

param: array $observers
return: array

phpunit_reset()   X-Ref
Reset everything if necessary.