ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
PhpIncludeInspection More...
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) | |
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 | |
PhpIncludeInspection
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.
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().
ilEventDetector::getActivated | ( | ) |
ilEventDetector::getDbId | ( | ) |
Returns the database id of the detector if set.
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.
References array.
ilEventDetector::getEventContext | ( | ) |
Get the event context set to the detector.
Implements ilExternalDetector.
Definition at line 184 of file class.ilEventDetector.php.
References array.
ilEventDetector::getEventSubject | ( | ) |
Get the event subject set to the detector.
Implements ilExternalDetector.
Definition at line 162 of file class.ilEventDetector.php.
References array.
ilEventDetector::getListeningTimeframe | ( | ) |
Returns the listening timefrage of the detector.
Implements ilExternalDetector.
Definition at line 387 of file class.ilEventDetector.php.
References array.
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.
References time.
Referenced by trigger().
ilEventDetector::onActivate | ( | ) |
Method called on activation.
Implements ilDetector.
Definition at line 308 of file class.ilEventDetector.php.
References ilSimpleDetector\setDetectorState(), and writeDetectorToDb().
ilEventDetector::onDeactivate | ( | ) |
Method called on deactivation.
Implements ilDetector.
Definition at line 317 of file class.ilEventDetector.php.
References deleteDetectorFromDb(), and ilSimpleDetector\setDetectorState().
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, $event_type, and string.
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, $event_context_type, and string.
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, $event_subject_type, and string.
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. |
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. |
Implements ilDetector.
Definition at line 209 of file class.ilEventDetector.php.
References $key, $params, ilSimpleDetector\getContext(), ilSimpleDetector\getDetectorState(), isListening(), and ilSimpleDetector\setDetectorState().
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().
|
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().
ilEventDetector::$was_activated |
Definition at line 393 of file class.ilEventDetector.php.
Referenced by getActivated().