ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilBaseElement Class Reference

Class ilBaseElement. More...

+ Inheritance diagram for ilBaseElement:
+ Collaboration diagram for ilBaseElement:

Public Member Functions

 getBpmn2Array ()
 
 setBpmn2Array ($bpmn2_array)
 
 handleDataAssociations ($element, $class_object, $element_varname)
 
 getDataInputAssociationIdentifiers ($element)
 
 getDataOutputAssociationIdentifiers ($element)
 

Protected Attributes

 $bpmn2_array
 

Detailed Description

Class ilBaseElement.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 12 of file class.ilBaseElement.php.

Member Function Documentation

◆ getBpmn2Array()

ilBaseElement::getBpmn2Array ( )
Returns
mixed

Definition at line 20 of file class.ilBaseElement.php.

References $bpmn2_array.

21  {
22  return $this->bpmn2_array;
23  }

◆ getDataInputAssociationIdentifiers()

ilBaseElement::getDataInputAssociationIdentifiers (   $element)
Parameters
array$element
Returns
array

Definition at line 78 of file class.ilBaseElement.php.

Referenced by ilCallActivityElement\getPHP(), and ilSendTaskElement\getPHP().

79  {
80  $retval = array();
81 
82  if (isset($element['children'])) {
83  foreach ($element['children'] as $child) {
84  if ($child['namespace'] == 'bpmn2' && $child['name'] == 'dataInputAssociation') {
85  foreach ($child['children'] as $reference) {
86  if ($reference['namespace'] == 'bpmn2' && $reference['name'] == 'sourceRef') {
87  $retval[] = $reference['content'];
88  }
89  }
90  }
91  }
92  }
93 
94  return $retval;
95  }
+ Here is the caller graph for this function:

◆ getDataOutputAssociationIdentifiers()

ilBaseElement::getDataOutputAssociationIdentifiers (   $element)
Parameters
array$element
Returns
array

Definition at line 102 of file class.ilBaseElement.php.

Referenced by ilCallActivityElement\getPHP().

103  {
104  $retval = array();
105 
106  if (isset($element['children'])) {
107  foreach ($element['children'] as $child) {
108  if ($child['namespace'] == 'bpmn2' && $child['name'] == 'dataOutputAssociation') {
109  foreach ($child['children'] as $reference) {
110  if ($reference['namespace'] == 'bpmn2' && $reference['name'] == 'targetRef') {
111  $retval[] = $reference['content'];
112  }
113  }
114  }
115  }
116  }
117 
118  return $retval;
119  }
+ Here is the caller graph for this function:

◆ handleDataAssociations()

ilBaseElement::handleDataAssociations (   $element,
  $class_object,
  $element_varname 
)
Parameters
array$element
ilWorkflowScaffold$class_object
string$element_varname
Returns
string

Definition at line 40 of file class.ilBaseElement.php.

References $code.

Referenced by ilCallActivityElement\getPHP(), ilStartEventElement\getPHP(), ilEndEventElement\getPHP(), and ilIntermediateCatchEventElement\getPHP().

41  {
42  $code = '';
43  if (isset($element['children']) && count($element['children'])) {
44  foreach ($element['children'] as $child) {
45  if ($child['name'] == 'dataInputAssociation') {
46  $class_object->registerRequire('./Services/WorkflowEngine/classes/detectors/class.ilDataDetector.php');
47  $reference_name = $child['children'][0]['content'];
48  $code .= '
49  ' . $element_varname . '_inputDataDetector = new ilDataDetector(' . $element_varname . ');
50  ' . $element_varname . '_inputDataDetector->setVarName("' . $reference_name . '");
51  ' . $element_varname . '_inputDataDetector->setName(' . $element_varname . '_inputDataDetector);
52  ' . $element_varname . '->addDetector(' . $element_varname . '_inputDataDetector);
53  ';
54  }
55 
56  if ($child['name'] == 'dataOutputAssociation') {
57  $class_object->registerRequire('./Services/WorkflowEngine/classes/emitters/class.ilDataEmitter.php');
58  $reference_name = $child['children'][0]['content'];
59  // So we need a data emitter to the given
60  $code .= '
61  ' . $element_varname . '_outputDataEmitter = new ilDataEmitter(' . $element_varname . ');
62  ' . $element_varname . '_outputDataEmitter->setVarName("' . $reference_name . '");
63  ' . $element_varname . '_outputDataEmitter->setName(' . $element_varname . '_outputDataEmitter);
64  ' . $element_varname . '->addEmitter(' . $element_varname . '_outputDataEmitter);
65  ';
66  }
67  }
68  }
69 
70  return $code;
71  }
$code
Definition: example_050.php:99
+ Here is the caller graph for this function:

◆ setBpmn2Array()

ilBaseElement::setBpmn2Array (   $bpmn2_array)
Parameters
mixed$bpmn2_array

Definition at line 28 of file class.ilBaseElement.php.

References $bpmn2_array.

29  {
30  $this->bpmn2_array = $bpmn2_array;
31  }

Field Documentation

◆ $bpmn2_array

ilBaseElement::$bpmn2_array
protected

Definition at line 15 of file class.ilBaseElement.php.

Referenced by getBpmn2Array(), and setBpmn2Array().


The documentation for this class was generated from the following file: