Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

Event documentation

Copyright: 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 222 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: eventlist  - X-Ref

Class for returning event information.

get_core_eventlist()   X-Ref
Return all of the core event files.

return: array Core events.

get_non_core_eventlist($withoutcomponent = false)   X-Ref
This function returns an array of all events for the plugins of the system.

param: bool $withoutcomponent Return an eventlist without associated components.
return: array A list of events from all plug-ins.

get_file_list($directory)   X-Ref
Returns a list of files with a full directory path in a specified directory.

param: string $directory location of files.
return: array full location of files from the specified directory.

get_all_eventlist($withoutcomponent = false)   X-Ref
Get a list of events present in the system.

param: bool $withoutcomponent Return an eventlist without associated components.
return: array list of events present in the system.

get_plugin_list($eventlist = array()   X-Ref
Return list of plugins that have events.

param: array $eventlist a list of events present in the system {@link eventlist::get_all_eventlist}.
return: array list of plugins with human readable name.

validate_event_plugin($plugin, $eventname, $eventlist = array()   X-Ref
validate if the given event belongs to the given plugin.

param: string $plugin Frankenstyle name of the plugin.
param: string $eventname Full qualified event name.
param: array $eventlist List of events generated by {@link eventlist::get_all_eventlist}
return: bool Returns true if the selected event belongs to the selected plugin, false otherwise.