|
ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
@noinspection PhpIncludeInspection More...
Inheritance diagram for ilEventDetector:
Collaboration diagram for ilEventDetector:Public Member Functions | |
| __construct ($context) | |
| Default constructor, passing the context to the parent constructor. More... | |
| setEvent ($event_type, $event_content) | |
| Sets the event type and content (/qualifier) for the detector. More... | |
| getEvent () | |
| Returns the event type and content currently set to the detector. More... | |
| setEventSubject ($event_subject_type, $event_subject_identifier) | |
| Set the event subject type to the detector. More... | |
| getEventSubject () | |
| Get the event subject set to the detector. More... | |
| setEventContext ($event_context_type, $event_context_identifier) | |
| Set the event context to the detector. More... | |
| getEventContext () | |
| Get the event context set to the detector. More... | |
| trigger ($params) | |
| Triggers the detector. More... | |
| isListening () | |
| Returns if the detector is currently listening. More... | |
| setListeningTimeframe ($listening_start, $listening_end) | |
| Sets the timeframe, in which the detector is listening. More... | |
| onActivate () | |
| Method called on activation. More... | |
| onDeactivate () | |
| Method called on deactivation. More... | |
| setDbId ($a_id) | |
| Sets the database id of the detector. More... | |
| getDbId () | |
| Returns the database id of the detector if set. More... | |
| hasDbId () | |
| Returns, if the detector has a database id. More... | |
| writeDetectorToDb () | |
| Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the database. More... | |
| deleteDetectorFromDb () | |
| Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database. More... | |
| getListeningTimeframe () | |
| Returns the listening timefrage of the detector. More... | |
| getActivated () | |
Public Member Functions inherited from ilSimpleDetector | |
| __construct (ilNode $context) | |
| Default constructor. More... | |
| getContext () | |
| Returns the parent object. More... | |
| trigger ($params) | |
| Trigger this detector. More... | |
| getDetectorState () | |
| Returns if the current detector state is satisfied or not. More... | |
| setDetectorState ($new_state) | |
| Sets a new detector state. More... | |
| onActivate () | |
| Method is called, when the parent node is activated. More... | |
| onDeactivate () | |
| Method is called, when the parent node is deactivated. More... | |
| getActivated () | |
| setName ($name) | |
| getName () | |
| getSourceNode () | |
| setSourceNode ($source_node) | |
| trigger ($params) | |
| getDetectorState () | |
| onActivate () | |
| onDeactivate () | |
| getContext () | |
| This method returns the context of the element. More... | |
| setName ($name) | |
| getName () | |
| setDbId ($a_id) | |
| getDbId () | |
| hasDbId () | |
| writeDetectorToDb () | |
| deleteDetectorFromDb () | |
| isListening () | |
| getListeningTimeframe () | |
| setListeningTimeframe ($listening_start, $listening_end) | |
| getEvent () | |
| getEventSubject () | |
| getEventContext () | |
Data Fields | |
| $was_activated | |
Private Attributes | |
| $event_type | |
| $event_content | |
| $event_subject_type | |
| $event_subject_identifier | |
| $event_context_type | |
| $event_context_identifier | |
| $listening_start = 0 | |
| $listening_end = 0 | |
| $db_id = null | |
Additional Inherited Members | |
Protected Attributes inherited from ilSimpleDetector | |
| $name | |
| $source_node | |
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection ilEventDetector is part of the petri net based workflow engine.
The event detector listens to non-timer related outside events. Examples are events raised by Ilias, such as a new member joined a group/course, a test was finished, a learning progress was updated, etc. Please note here the differing handling of the params at the trigger method.
/
Definition at line 22 of file class.ilEventDetector.php.
| ilEventDetector::__construct | ( | $context | ) |
Default constructor, passing the context to the parent constructor.
| ilNode | $context |
Definition at line 118 of file class.ilEventDetector.php.
References ilSimpleDetector\$context, and ILIAS\GlobalScreen\Provider\__construct().
Here is the call graph for this function:| ilEventDetector::deleteDetectorFromDb | ( | ) |
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database.
Implements ilExternalDetector.
Definition at line 376 of file class.ilEventDetector.php.
Referenced by onDeactivate().
Here is the caller graph for this function:| ilEventDetector::getActivated | ( | ) |
Reimplemented from ilSimpleDetector.
Definition at line 398 of file class.ilEventDetector.php.
References $was_activated.
| ilEventDetector::getDbId | ( | ) |
Returns the database id of the detector if set.
ilWorkflowObjectStateException
Implements ilExternalDetector.
Definition at line 339 of file class.ilEventDetector.php.
References $db_id.
| ilEventDetector::getEvent | ( | ) |
Returns the event type and content currently set to the detector.
Implements ilExternalDetector.
Definition at line 140 of file class.ilEventDetector.php.
| ilEventDetector::getEventContext | ( | ) |
Get the event context set to the detector.
Implements ilExternalDetector.
Definition at line 184 of file class.ilEventDetector.php.
| ilEventDetector::getEventSubject | ( | ) |
Get the event subject set to the detector.
Implements ilExternalDetector.
Definition at line 162 of file class.ilEventDetector.php.
| ilEventDetector::getListeningTimeframe | ( | ) |
Returns the listening timefrage of the detector.
Implements ilExternalDetector.
Definition at line 387 of file class.ilEventDetector.php.
| ilEventDetector::hasDbId | ( | ) |
Returns, if the detector has a database id.
Implements ilExternalDetector.
Definition at line 353 of file class.ilEventDetector.php.
| ilEventDetector::isListening | ( | ) |
Returns if the detector is currently listening.
Implements ilExternalDetector.
Definition at line 265 of file class.ilEventDetector.php.
Referenced by trigger().
Here is the caller graph for this function:| ilEventDetector::onActivate | ( | ) |
Method called on activation.
Reimplemented from ilSimpleDetector.
Definition at line 308 of file class.ilEventDetector.php.
References ilSimpleDetector\setDetectorState(), and writeDetectorToDb().
Here is the call graph for this function:| ilEventDetector::onDeactivate | ( | ) |
Method called on deactivation.
Reimplemented from ilSimpleDetector.
Definition at line 317 of file class.ilEventDetector.php.
References deleteDetectorFromDb(), and ilSimpleDetector\setDetectorState().
Here is the call graph for this function:| ilEventDetector::setDbId | ( | $a_id | ) |
Sets the database id of the detector.
| integer | $a_id |
Implements ilExternalDetector.
Definition at line 328 of file class.ilEventDetector.php.
| ilEventDetector::setEvent | ( | $event_type, | |
| $event_content | |||
| ) |
Sets the event type and content (/qualifier) for the detector.
'WHAT'
| string | $event_type | |
| string | $event_content |
Definition at line 129 of file class.ilEventDetector.php.
References $event_content, and $event_type.
| ilEventDetector::setEventContext | ( | $event_context_type, | |
| $event_context_identifier | |||
| ) |
Set the event context to the detector.
'WHERE' / 'ON WHAT' / 'ON WHOM'
| string | $event_context_type | |
| integer | $event_context_identifier |
Definition at line 173 of file class.ilEventDetector.php.
References $event_context_identifier, and $event_context_type.
| ilEventDetector::setEventSubject | ( | $event_subject_type, | |
| $event_subject_identifier | |||
| ) |
Set the event subject type to the detector.
'WHO'
| string | $event_subject_type | |
| integer | $event_subject_identifier |
Definition at line 151 of file class.ilEventDetector.php.
References $event_subject_identifier, and $event_subject_type.
| ilEventDetector::setListeningTimeframe | ( | $listening_start, | |
| $listening_end | |||
| ) |
Sets the timeframe, in which the detector is listening.
| integer | $listening_start | Unix timestamp start of listening period. |
| integer | $listening_end | Unix timestamp end of listening period. |
ilWorkflowInvalidArgumentException
Implements ilExternalDetector.
Definition at line 293 of file class.ilEventDetector.php.
References $listening_end, and $listening_start.
| ilEventDetector::trigger | ( | $params | ) |
Triggers the detector.
The params for this trigger have to be assembled like this: array ( 'event_type' => 'course_join', 'event_content' => 'member_join', 'event_subject_type => 'usr', 'event_subject_identifier' => '6', 'event_context_type' => 'crs', 'event_context_identifier' => '48' )
This would describe an event, in which a user joined a course as member. If an identifier is '0', they are meant as 'for all'.
| array | $params | Associative array with params, see docs for details. |
Reimplemented from ilSimpleDetector.
Definition at line 209 of file class.ilEventDetector.php.
References ilSimpleDetector\getContext(), ilSimpleDetector\getDetectorState(), isListening(), and ilSimpleDetector\setDetectorState().
Here is the call graph for this function:| ilEventDetector::writeDetectorToDb | ( | ) |
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the database.
Implements ilExternalDetector.
Definition at line 366 of file class.ilEventDetector.php.
Referenced by onActivate().
Here is the caller graph for this function:
|
private |
Definition at line 111 of file class.ilEventDetector.php.
Referenced by getDbId().
|
private |
Definition at line 52 of file class.ilEventDetector.php.
Referenced by setEvent().
|
private |
Definition at line 92 of file class.ilEventDetector.php.
Referenced by setEventContext().
|
private |
Definition at line 83 of file class.ilEventDetector.php.
Referenced by setEventContext().
|
private |
Definition at line 71 of file class.ilEventDetector.php.
Referenced by setEventSubject().
|
private |
Definition at line 62 of file class.ilEventDetector.php.
Referenced by setEventSubject().
|
private |
Definition at line 39 of file class.ilEventDetector.php.
Referenced by setEvent().
|
private |
Definition at line 104 of file class.ilEventDetector.php.
Referenced by setListeningTimeframe().
|
private |
Definition at line 98 of file class.ilEventDetector.php.
Referenced by setListeningTimeframe().
| bool ilEventDetector::$was_activated |
Definition at line 393 of file class.ilEventDetector.php.
Referenced by getActivated().