ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDataInputElement Class Reference

Class ilDataInputElement. More...

+ Inheritance diagram for ilDataInputElement:
+ Collaboration diagram for ilDataInputElement:

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 ilDataInputElement.

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

/

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

Member Function Documentation

◆ getPHP()

ilDataInputElement::getPHP (   $element,
ilWorkflowScaffold  $class_object 
)
Parameters
$element
\ilWorkflowScaffold$class_object
Returns
string

Definition at line 23 of file class.ilDataInputElement.php.

References $code, array, ilBPMN2ParserUtils\extractDataNamingFromElement(), ilBPMN2ParserUtils\extractILIASDataObjectDefinitionFromElement(), ilBPMN2ParserUtils\extractILIASInputPropertiesFromElement(), and ilBPMN2ParserUtils\xsIDToPHPVarname().

24  {
25  $name = $element['name'];
26  $element_id = ilBPMN2ParserUtils::xsIDToPHPVarname($element['attributes']['id']);
28 
29  if($ext_name != null)
30  {
31  $name = $ext_name;
32  }
33 
35  $array_elements = array();
36  foreach((array)$input_properties as $key => $value)
37  {
38  $array_elements[] = '"'.$key.'" => "'.$value.'"';
39  }
40 
41  $definition = 'array(' . implode(',', (array)$array_elements) . ')';
42 
44 
45  if($object_definition != null)
46  {
47  $type = $object_definition['type'];
48  $role = $object_definition['role'];
49  } else {
50  $type = 'mixed';
51  $role = 'undefined';
52  }
53 
54  $code = "";
55  $code .= '
56  $this->defineInstanceVar("'.$element_id.'", "'.$name.'", false, "", "'.$type.'", "'.$role.'" );
57  $this->registerInputVar("'.$element_id.'", '.$definition.');
58 ';
59 
60  return $code;
61  }
static extractDataNamingFromElement($element)
$code
Definition: example_050.php:99
static extractILIASInputPropertiesFromElement($element)
Create styles array
The data for the language used.
static extractILIASDataObjectDefinitionFromElement($element)
+ Here is the call graph for this function:

Field Documentation

◆ $element_varname

ilDataInputElement::$element_varname

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


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