5 require_once
'./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php';
7 require_once
'./Services/WorkflowEngine/interfaces/ilExternalDetector.php';
149 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
164 if ($this->listening_start == 0 && $this->listening_end == 0) {
169 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
173 || $this->listening_end == 0) {
194 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowInvalidArgumentException.php';
206 if ($this->timer_relative) {
207 if ($this->timer_start == 0) {
208 $this->listening_start =
time();
212 if ($this->timer_limit != 0) {
215 $this->listening_end = 0;
238 $this->db_id = $a_id;
248 if ($this->db_id != null) {
251 require_once
'./Services/WorkflowEngine/exceptions/ilWorkflowObjectStateException.php';
263 if ($this->db_id == null) {
276 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
277 ilWorkflowDbHelper::writeDetector($this);
286 require_once
'./Services/WorkflowEngine/classes/utils/class.ilWorkflowDbHelper.php';
287 ilWorkflowDbHelper::deleteDetector($this);
297 return array(
'type' => $this->event_type,
'content' => $this->event_content);
307 return array(
'type' => $this->event_subject_type,
'identifier' => $this->event_subject_identifier);
317 return array(
'type' => $this->event_context_type,
'identifier' => $this->event_context_identifier);
326 return array(
'listening_start' => $this->listening_start,
'listening_end' => $this->listening_end);
writeDetectorToDb()
Passes this detector to the ilWorkflowDBHelper in order to write or update the detector data to the d...
getDetectorState()
Returns if the current detector state is satisfied or not.
getDbId()
Returns the database id of the detector if set.
getEventContext()
Get the event context set to the detector.
getEventSubject()
Get the event subject set to the detector.
setListeningTimeframe($listening_start, $listening_end)
Sets the timeframe, in which the detector is listening.
onActivate()
Method called on activation.
setTimerLimit($timer_limit)
Sets the timers limit.
$event_context_identifier
deleteDetectorFromDb()
Passes this detector to the ilWorkflowDbHelper in order to remove the detector data from the database...
getTimerLimit()
Returns the currently set timers limit.
setDbId($a_id)
Sets the database id of the detector.
Create styles array
The data for the language used.
setDetectorState($new_state)
Sets a new detector state.
$event_subject_identifier
hasDbId()
Returns, if the detector has a database id.
__construct($context)
Default constructor, passing the context to the parent constructor.
trigger($params)
Trigger this detector.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
getListeningTimeframe()
Returns the listening timefrage of the detector.
getEvent()
Returns the event type and content currently set to the detector.
setTimerRelative($timer_relative)
onDeactivate()
Method called on deactivation.
setTimerStart($timer_start)
Sets the timers start datetime.
isListening()
Returns if the detector is currently listening.
getTimerStart()
Returns the currently set timer start.