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}
An exception for terminatinating execution or to throw for unit testing.
static extractDataNamingFromElement($element)
static extractILIASDataObjectDefinitionFromElement($element)
static extractILIASInputPropertiesFromElement($element)
Class ilBaseElement.
Class ilDataInputElement.
getPHP($element, ilWorkflowScaffold $class_object)
Class ilWorkflowScaffold.
$key
Definition: croninfo.php:18
$code
Definition: example_050.php:99
if($format !==null) $name
Definition: metadata.php:146
$type