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

Class ilCallActivityElement. More...

+ Inheritance diagram for ilCallActivityElement:
+ Collaboration diagram for ilCallActivityElement:

Public Member Functions

 getPHP ($element, ilWorkflowScaffold $class_object)
 
- Public Member Functions inherited from ilBaseElement
 getBpmn2Array ()
 
 setBpmn2Array ($bpmn2_array)
 
 handleDataAssociations ($element, $class_object, $element_varname)
 
 getDataInputAssociationIdentifiers ($element)
 
 getDataOutputAssociationIdentifiers ($element)
 

Data Fields

 $element_varname
 

Additional Inherited Members

- Protected Attributes inherited from ilBaseElement
 $bpmn2_array
 

Detailed Description

Class ilCallActivityElement.

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

/

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

Member Function Documentation

◆ getPHP()

ilCallActivityElement::getPHP (   $element,
ilWorkflowScaffold  $class_object 
)

Definition at line 16 of file class.ilCallActivityElement.php.

References $code, ilBPMN2ParserUtils\extractILIASLibraryCallDefinitionFromElement(), ilBaseElement\getDataInputAssociationIdentifiers(), ilBaseElement\getDataOutputAssociationIdentifiers(), ilBaseElement\handleDataAssociations(), ilWorkflowScaffold\registerRequire(), and ilBPMN2ParserUtils\xsIDToPHPVarname().

17  {
18  $code = "";
19  $element_id = ilBPMN2ParserUtils::xsIDToPHPVarname($element['attributes']['id']);
20  $this->element_varname = '$_v_' . $element_id;
21 
23 
24  $class_object->registerRequire('./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php');
25  $class_object->registerRequire('./Services/WorkflowEngine/classes/activities/class.ilStaticMethodCallActivity.php');
26 
27  $data_inputs = $this->getDataInputAssociationIdentifiers($element);
28  $activity_parameters = '';
29  if (count($data_inputs)) {
30  $activity_parameters = '"' . implode('","', $data_inputs) . '"';
31  }
32 
33  $data_outputs = $this->getDataOutputAssociationIdentifiers($element);
34  $activity_outputs = '';
35  if (count($data_outputs)) {
36  $activity_outputs = '"' . implode('","', $data_outputs) . '"';
37  }
38 
39  $code .= '
40  ' . $this->element_varname . ' = new ilBasicNode($this);
41  $this->addNode(' . $this->element_varname . ');
42  ' . $this->element_varname . '->setName(\'' . $this->element_varname . '\');
43 
44  ' . $this->element_varname . '_callActivity = new ilStaticMethodCallActivity(' . $this->element_varname . ');
45  ' . $this->element_varname . '_callActivity->setName(\'' . $this->element_varname . '_callActivity\');
46  ' . $this->element_varname . '_callActivity->setIncludeFilename("' . $library_definition['include_filename'] . '");
47  ' . $this->element_varname . '_callActivity->setClassAndMethodName("' . $library_definition['class_and_method'] . '");
48  ' . $this->element_varname . '_callActivity_params = array(' . $activity_parameters . ');
49  ' . $this->element_varname . '_callActivity->setParameters(' . $this->element_varname . '_callActivity_params);
50  ' . $this->element_varname . '_callActivity_outputs = array(' . $activity_outputs . ');
51  ' . $this->element_varname . '_callActivity->setOutputs(' . $this->element_varname . '_callActivity_outputs);
52  ' . $this->element_varname . '->addActivity(' . $this->element_varname . '_callActivity);
53  ';
54  $code .= $this->handleDataAssociations($element, $class_object, $this->element_varname);
55  return $code;
56  }
getDataInputAssociationIdentifiers($element)
handleDataAssociations($element, $class_object, $element_varname)
$code
Definition: example_050.php:99
getDataOutputAssociationIdentifiers($element)
static extractILIASLibraryCallDefinitionFromElement($element)
+ Here is the call graph for this function:

Field Documentation

◆ $element_varname

ilCallActivityElement::$element_varname

Definition at line 14 of file class.ilCallActivityElement.php.


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