ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  $name = $ext_name;
31  }
32 
34  $array_elements = array();
35  foreach ((array) $input_properties as $key => $value) {
36  $array_elements[] = '"' . $key . '" => "' . $value . '"';
37  }
38 
39  $definition = 'array(' . implode(',', (array) $array_elements) . ')';
40 
42 
43  if ($object_definition != null) {
44  $type = $object_definition['type'];
45  $role = $object_definition['role'];
46  } else {
47  $type = 'mixed';
48  $role = 'undefined';
49  }
50 
51  $code = "";
52  $code .= '
53  $this->defineInstanceVar("' . $element_id . '", "' . $name . '", false, "", "' . $type . '", "' . $role . '" );
54  $this->registerInputVar("' . $element_id . '", ' . $definition . ');
55 ';
56 
57  return $code;
58  }
59 }
getPHP($element, ilWorkflowScaffold $class_object)
static extractDataNamingFromElement($element)
$type
Class ilWorkflowScaffold.
$code
Definition: example_050.php:99
if($format !==null) $name
Definition: metadata.php:146
static extractILIASInputPropertiesFromElement($element)
Class ilDataInputElement.
Create styles array
The data for the language used.
static extractILIASDataObjectDefinitionFromElement($element)
Class ilBaseElement.
$key
Definition: croninfo.php:18