5require_once 
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
 
    7require_once 
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
 
  142        return array(
'type' => $this->event_type, 
'content' => $this->event_content);
 
  164        return array(
'type' => $this->event_subject_type, 
'identifier' => $this->event_subject_identifier);
 
  186        return array(
'type' => $this->event_context_type, 
'identifier' => $this->event_context_identifier);
 
  215        if ($this->event_type !== 
$params[0]) {
 
  220        if ($this->event_content !== 
$params[1]) {
 
  225        if ($this->event_subject_type !== 
$params[2]) {
 
  230        if ($this->event_subject_identifier !== 
$params[3] && $this->event_subject_identifier != 0) {
 
  235        if ($this->event_context_type !== 
$params[4]) {
 
  240        if ($this->event_context_identifier !== 
$params[5] && $this->event_context_identifier != 0) {
 
  252            $this->was_activated = 
true;
 
  268        if ($this->listening_start == 0 && $this->listening_end == 0) {
 
  273        require_once 
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
 
  274        if ($this->listening_start <= ilWorkflowUtils::time()) {
 
  276            if ($this->listening_end >= ilWorkflowUtils::time()
 
  277                || $this->listening_end == 0) {
 
  298            require_once 
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
 
  330        $this->db_id = $a_id;
 
  341        if ($this->db_id != 
null) {
 
  344            require_once 
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
 
  355        if ($this->db_id == 
null) {
 
  368        require_once 
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
 
  369        ilWorkflowDbHelper::writeDetector($this);
 
  378        require_once 
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
 
  379        ilWorkflowDbHelper::deleteDetector($this);
 
  389        return array(
'listening_start' => $this->listening_start, 
'listening_end' => $this->listening_end);
 
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
getEventSubject()
Get the event subject set to the detector.
onActivate()
Method called on activation.
getDbId()
Returns the database id of the detector if set.
onDeactivate()
Method called on deactivation.
setEventSubject($event_subject_type, $event_subject_identifier)
Set the event subject type to the detector.
setEvent($event_type, $event_content)
Sets the event type and content (/qualifier) for the detector.
__construct($context)
Default constructor, passing the context to the parent constructor.
hasDbId()
Returns, if the detector has a database id.
trigger($params)
Triggers the detector.
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
$event_context_identifier
setEventContext($event_context_type, $event_context_identifier)
Set the event context to the detector.
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
setDbId($a_id)
Sets the database id of the detector.
getEventContext()
Get the event context set to the detector.
getListeningTimeframe()
Returns the listening timefrage of the detector.
getEvent()
Returns the event type and content currently set to the detector.
isListening()
Returns if the detector is currently listening.
$event_subject_identifier
@noinspection PhpIncludeInspection
getDetectorState()
Returns if the current detector state is satisfied or not.
getContext()
Returns the parent object.
setDetectorState($new_state)
Sets a new detector state.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection