ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilActivationEmitter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
5 require_once './Services/WorkflowEngine/interfaces/ilEmitter.php';
7 require_once './Services/WorkflowEngine/interfaces/ilDetector.php';
9 require_once './Services/WorkflowEngine/interfaces/ilNode.php';
11 require_once './Services/WorkflowEngine/interfaces/ilWorkflowEngineElement.php';
12 
33 {
40 
46  private $context;
47 
49  private $emitted;
50 
52  protected $name;
53 
59  public function __construct(ilNode $context)
60  {
61  $this->context = $context;
62  $this->emitted = false;
63  }
64 
70  public function setTargetDetector(ilDetector $a_target_detector)
71  {
72  $this->target_detector = $a_target_detector;
73  }
74 
80  public function getTargetDetector()
81  {
83  }
84 
90  public function getContext()
91  {
92  return $this->context;
93  }
94 
98  public function emit()
99  {
100  $this->emitted = true;
101  $target_node = $this->target_detector->getContext();
102  $target_node->activate();
103  $this->target_detector->trigger(array());
104  }
105 
109  public function getActivated()
110  {
111  return $this->emitted;
112  }
113 
117  public function setName($name)
118  {
119  $this->name = $name;
120  }
121 
125  public function getName()
126  {
127  return $this->name;
128  }
129 }
ilWorkflowEngineElement Interface is part of the petri net based workflow engine. ...
getContext()
Returns a reference to the parent node of this emitter.
setTargetDetector(ilDetector $a_target_detector)
Sets the target detector for this emitter.
__construct(ilNode $context)
Default constructor.
PhpIncludeInspection
Definition: ilNode.php:25
getTargetDetector()
Gets the currently set target detector of this emitter.
ilDetector Interface is part of the petri net based workflow engine.
Definition: ilDetector.php:16
ilEmitter Interface is part of the petri net based workflow engine.
Definition: ilEmitter.php:16
emit()
Executes this emitter after activating the target node.