ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
StartEvent_Message_goldsample.php
Go to the documentation of this file.
1 <?php
2 require_once './Services/WorkflowEngine/classes/workflows/class.ilBaseWorkflow.php';
3 require_once './Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
4 require_once './Services/WorkflowEngine/classes/detectors/class.ilEventDetector.php';
5 
7  {
8 
9  public static $startEventRequired = true;
10 
11  public static function getStartEventInfo()
12  {
13  $events[] = array(
14  'type' => 'Course',
15  'content' => 'UserWasAssigned',
16  'subject_type' => 'usr',
17  'subject_id' => '0',
18  'context_type' => 'crs',
19  'context_id' => '0',
20  );
21 
22  return $events;
23  }
24 
25  public function __construct()
26  {
27 
28  $_v_StartEvent_2 = new ilBasicNode($this);
29  $this->addNode($_v_StartEvent_2);
30  $_v_StartEvent_2->setName('$_v_StartEvent_2');
31 
32  $_v_StartEvent_2_detector = new ilEventDetector($_v_StartEvent_2);
33  $_v_StartEvent_2_detector->setName('$_v_StartEvent_2_detector');
34  $_v_StartEvent_2_detector->setEvent( "Course", "UserWasAssigned");
35  $_v_StartEvent_2_detector->setEventSubject( "usr", "0");
36  $_v_StartEvent_2_detector->setEventContext( "crs", "0");
37  $_v_StartEvent_2_detector->setListeningTimeframe(0, 0);
38  }
39 
40 
41  public static function getMessageDefinition($id)
42  {
43  $definitions = array( 'Message_3' => array(
44  'name' => 'ILIASEvent::Course::UserWasAssigned',
45  'content' => '')
46  );
47  return $definitions[$id];
48  }
49 
50 
51  }
52 
53 ?>
PhpIncludeInspection
addNode(ilNode $node)
This method adds a node to the workflow.
PhpIncludeInspection
Create styles array
The data for the language used.
PhpIncludeInspection