ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilDataInputElement.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  $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  }
62 }
getPHP($element, ilWorkflowScaffold $class_object)
static extractDataNamingFromElement($element)
Class ilWorkflowScaffold.
$code
Definition: example_050.php:99
static extractILIASInputPropertiesFromElement($element)
Class ilDataInputElement.
Create styles array
The data for the language used.
static extractILIASDataObjectDefinitionFromElement($element)
Class ilBaseElement.