|
ILIAS
release_8 Revision v8.24
|
Global event handler. More...
Collaboration diagram for ilAppEventHandler:Public Member Functions | |
| __construct () | |
| raise (string $a_component, string $a_event, array $a_parameter=[]) | |
| Raise an event. More... | |
Protected Member Functions | |
| initListeners () | |
Protected Attributes | |
| ilDBInterface | $db |
| array | $listener |
| ilLogger | $logger |
| ilComponentRepository | $component_repository |
| ilComponentFactory | $component_factory |
Global event handler.
The event handler delegates application events (not gui events) between components that trigger events and components that listen to events. A component is a module or a service.
The component that triggers an event calls the raise function of the event handler through the global instance ilAppEventHandler:
E.g. in ilObjUser->delete(): $ilAppEventHandler->raise("Services/User", "deleteUser", array("id" => ..., ...))
A listener has to subscribe to the events of another component. This currently is done here in the constructor, e.g. if the News service listens to the User service, add a $this->listener["Services/User"] = array("Services/News"); This information will go to xml files in the future.
A component has to implement a listener class that implements Services/EventHandling/interfaces/interface.ilAppEventListener.php
The location must be <component>/classes/class.il<comp_name>AppEventListener.php, e.g. ./Services/News/classes/class.ilNewsAppEventListener.php
The class name must be il<comp_name>AppEventListener.
Definition at line 51 of file class.ilAppEventHandler.php.
| ilAppEventHandler::__construct | ( | ) |
Definition at line 59 of file class.ilAppEventHandler.php.
References $DIC, ilLoggerFactory\getLogger(), initListeners(), and ILIAS\Repository\logger().
Here is the call graph for this function:
|
protected |
Definition at line 71 of file class.ilAppEventHandler.php.
References $db, $ilDB, $res, ilGlobalCache\COMP_EVENTS, and ilGlobalCache\getInstance().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilAppEventHandler::raise | ( | string | $a_component, |
| string | $a_event, | ||
| array | $a_parameter = [] |
||
| ) |
Raise an event.
The event is passed to all interested listeners.
| string | $a_component | component, e.g. "Modules/Forum" or "Services/User" |
| string | $a_event | event e.g. "createUser", "updateUser", "deleteUser", ... |
| array | $a_parameter | parameter array (assoc), array("name" => ..., "phone_office" => ...) |
Definition at line 102 of file class.ilAppEventHandler.php.
References $listener, $name, XapiProxy\$plugin, and ILIAS\Repository\logger().
Referenced by ilObjOrgUnit\assignUsersToEmployeeRole(), ilObjOrgUnit\assignUsersToSuperiorRole(), ilObjOrgUnit\assignUserToLocalRole(), ilObjOrgUnit\deassignUserFromEmployeeRole(), ilObjOrgUnit\deassignUserFromLocalRole(), ilObjOrgUnit\deassignUserFromSuperiorRole(), ilObjOrgUnit\delete(), and ilAuthFrontend\handleAuthenticationSuccess().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 57 of file class.ilAppEventHandler.php.
|
protected |
Definition at line 56 of file class.ilAppEventHandler.php.
|
protected |
Definition at line 53 of file class.ilAppEventHandler.php.
Referenced by initListeners().
|
protected |
Definition at line 54 of file class.ilAppEventHandler.php.
Referenced by raise().
|
protected |
Definition at line 55 of file class.ilAppEventHandler.php.