ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSequenceFlowElement.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13{
16
23 public function getPHP($element, ilWorkflowScaffold $class_object)
24 {
25 $code = "";
26 $element_id = ilBPMN2ParserUtils::xsIDToPHPVarname($element['attributes']['id']);
27 $this->element_varname = '$_v_'.$element_id;
28
29 $source_element = '$_v_'.$element['attributes']['sourceRef'];
30 $target_element = '$_v_'.$element['attributes']['targetRef'];
31
32 $code .= '
33 '.$target_element.'_detector = new ilSimpleDetector('.$target_element.');
34 ' . $target_element . '_detector->setName(\'' . $target_element . '_detector\');
35 ' . $target_element . '_detector->setSourceNode(' . $source_element . ');
36 '.$target_element.'->addDetector('.$target_element.'_detector);
37 '.$source_element.'_emitter = new ilActivationEmitter('.$source_element.');
38 ' . $source_element . '_emitter->setName(\'' . $source_element . '_emitter\');
39 '.$source_element.'_emitter->setTargetDetector('.$target_element.'_detector);
40 '.$source_element.'->addEmitter('.$source_element.'_emitter);
41 ';
42
43 $class_object->registerRequire('./Services/WorkflowEngine/classes/emitters/class.ilActivationEmitter.php');
44 $class_object->registerRequire('./Services/WorkflowEngine/classes/detectors/class.ilSimpleDetector.php');
45
46 return $code;
47 }
48}
An exception for terminatinating execution or to throw for unit testing.
Class ilBaseElement.
Class ilSequenceFlowElement.
getPHP($element, ilWorkflowScaffold $class_object)
Class ilWorkflowScaffold.
$code
Definition: example_050.php:99