5 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7 require_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);
216 if ($this->event_type !==
$params[0])
222 if ($this->event_content !==
$params[1])
228 if ($this->event_subject_type !==
$params[2])
234 if ($this->event_subject_identifier !==
$params[3] && $this->event_subject_identifier != 0)
240 if ($this->event_context_type !==
$params[4])
246 if ($this->event_context_identifier !==
$params[5] && $this->event_context_identifier != 0)
256 foreach(
$params as $key => $value)
258 $this->
getContext()->setRuntimeVar($key, $value);
261 $this->was_activated =
true;
277 if ($this->listening_start == 0 && $this->listening_end == 0)
283 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
288 || $this->listening_end == 0)
311 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
343 $this->db_id = $a_id;
354 if ($this->db_id != null)
360 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
371 if ($this->db_id == null)
385 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
386 ilWorkflowDbHelper::writeDetector($this);
395 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
396 ilWorkflowDbHelper::deleteDetector($this);
406 return array (
'listening_start' => $this->listening_start,
'listening_end' => $this->listening_end);
isListening()
Returns if the detector is currently listening.
getDetectorState()
Returns if the current detector state is satisfied or not.
getEvent()
Returns the event type and content currently set to the detector.
hasDbId()
Returns, if the detector has a database id.
setDbId($a_id)
Sets the database id of the detector.
Add rich text string
The name of the decorator.
getListeningTimeframe()
Returns the listening timefrage of the detector.
getEventSubject()
Get the event subject set to the detector.
setEventSubject($event_subject_type, $event_subject_identifier)
Set the event subject type to the detector.
getEventContext()
Get the event context set to the detector.
trigger($params)
Triggers the detector.
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
onActivate()
Method called on activation.
$event_subject_identifier
Create styles array
The data for the language used.
setDetectorState($new_state)
Sets a new detector state.
getDbId()
Returns the database id of the detector if set.
setEventContext($event_context_type, $event_context_identifier)
Set the event context to the detector.
$event_context_identifier
__construct($context)
Default constructor, passing the context to the parent constructor.
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
setEvent($event_type, $event_content)
Sets the event type and content (/qualifier) for the detector.
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
onDeactivate()
Method called on deactivation.
getContext()
Returns the parent object.