ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 82 of file class.ilBaseElement.php.

References array.

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

83  {
84  $retval = array();
85 
86  if(isset($element['children']))
87  {
88  foreach($element['children'] as $child)
89  {
90  if($child['namespace'] == 'bpmn2' && $child['name'] == 'dataInputAssociation')
91  {
92  foreach($child['children'] as $reference)
93  {
94  if($reference['namespace'] == 'bpmn2' && $reference['name'] == 'sourceRef')
95  {
96  $retval[] = $reference['content'];
97  }
98  }
99  }
100  }
101  }
102 
103  return $retval;
104  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getDataOutputAssociationIdentifiers()

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

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

References array.

Referenced by ilCallActivityElement\getPHP().

112  {
113  $retval = array();
114 
115  if(isset($element['children']))
116  {
117  foreach($element['children'] as $child)
118  {
119  if($child['namespace'] == 'bpmn2' && $child['name'] == 'dataOutputAssociation')
120  {
121  foreach($child['children'] as $reference)
122  {
123  if($reference['namespace'] == 'bpmn2' && $reference['name'] == 'targetRef')
124  {
125  $retval[] = $reference['content'];
126  }
127  }
128  }
129  }
130  }
131 
132  return $retval;
133  }
Create styles array
The data for the language used.
+ 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  {
45  foreach ($element['children'] as $child)
46  {
47  if($child['name'] == 'dataInputAssociation')
48  {
49  $class_object->registerRequire('./Services/WorkflowEngine/classes/detectors/class.ilDataDetector.php');
50  $reference_name = $child['children'][0]['content'];
51  $code .= '
52  '.$element_varname.'_inputDataDetector = new ilDataDetector('.$element_varname.');
53  '.$element_varname.'_inputDataDetector->setVarName("'.$reference_name.'");
54  '.$element_varname.'_inputDataDetector->setName('.$element_varname.'_inputDataDetector);
55  '.$element_varname.'->addDetector('.$element_varname.'_inputDataDetector);
56  ';
57  }
58 
59  if($child['name'] == 'dataOutputAssociation')
60  {
61  $class_object->registerRequire('./Services/WorkflowEngine/classes/emitters/class.ilDataEmitter.php');
62  $reference_name = $child['children'][0]['content'];
63  // So we need a data emitter to the given
64  $code .= '
65  '.$element_varname.'_outputDataEmitter = new ilDataEmitter('.$element_varname.');
66  '.$element_varname.'_outputDataEmitter->setVarName("'.$reference_name.'");
67  '.$element_varname.'_outputDataEmitter->setName('.$element_varname.'_outputDataEmitter);
68  '.$element_varname.'->addEmitter('.$element_varname.'_outputDataEmitter);
69  ';
70  }
71  }
72  }
73 
74  return $code;
75  }
$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: