5 require_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
37 $this->lng = $DIC[
'lng'];
38 $this->tree = $DIC[
'tree'];
49 public function getForm($input_vars, $event_definition)
52 $form->setTitle($this->lng->txt(
'input_variables_required'));
53 $form->setDescription($this->lng->txt(
'input_static_variables_desc'));
56 $process_id_input->setValue(stripslashes(
$_GET[
'process_id']));
57 $form->addItem($process_id_input);
59 $event = $event_definition[0];
64 $form->addCommandButton(
'listen', $this->lng->txt(
'start_listening'));
65 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
73 $children = $this->tree->getFilteredSubTree($this->tree->getRootId());
76 foreach ($children as $child)
78 if (strtolower(
$config[
'allowedtype']) != $child[
'type'])
83 $path = $this->tree->getPathFull($child[
'child']);
84 $option_elements =
array();
85 foreach (
$path as $node)
87 if ($node[
'type'] ==
'root')
91 $option_elements[] = $node[
'title'];
94 $options[ $child[
'child'] ] = implode(
' / ', $option_elements);
109 if(count($input_vars))
112 $section->setTitle(
$lng->txt(
'static_input_form_header'));
116 foreach ($input_vars as $input_var)
120 switch (strtolower($input_var[
'type']))
128 $item =
new ilTextInputGUI($input_var[
'caption'], $input_var[
'name']);
133 $item->setRequired($input_var[
'requirement'] ==
'required' ?
true :
false);
134 $item->setInfo($input_var[
'description']);
135 $form->addItem($item);
147 $section->setTitle(
$lng->txt(
'start_event_form_header'));
151 $type_input->
setValue($event[
'type']);
152 $type_input->setDisabled(
true);
153 $form->addItem($type_input);
156 $content_input->
setValue($event[
'content']);
157 $content_input->setDisabled(
true);
158 $form->addItem($content_input);
160 $subject_type_input =
new ilTextInputGUI(
$lng->txt(
'subject_type'),
'se_subject_type');
161 $subject_type_input->
setValue($event[
'subject_type']);
162 $subject_type_input->setDisabled(
true);
163 $form->addItem($subject_type_input);
167 $subject_by_id_selector =
new ilRadioOption(
$lng->txt(
'subject_by_id'),
'se_subject_by_id');
169 $subject_id_input->
setValue($event[
'subject_id']);
170 $subject_by_id_selector->
addSubItem($subject_id_input);
171 $subject_selector->addOption($subject_by_id_selector);
173 $subject_by_mask_selector =
new ilRadioOption(
$lng->txt(
'subject_by_mask'),
'se_subject_by_mask');
174 $subject_by_mask_selector->
setValue($event[
'subject_id']);
175 $subject_selector->addOption($subject_by_mask_selector);
177 $subject_selector->setValue($event[
'subject_id']);
178 $form->addItem($subject_selector);
180 $context_type_input =
new ilTextInputGUI(
$lng->txt(
'context_type'),
'se_context_type');
181 $context_type_input->
setValue($event[
'context_type']);
182 $context_type_input->setDisabled(
true);
183 $form->addItem($context_type_input);
187 $context_by_id_selector =
new ilRadioOption(
$lng->txt(
'context_by_id'),
'se_context_by_id');
189 $context_id_input->
setValue($event[
'context_id']);
190 $context_by_id_selector->
addSubItem($context_id_input);
191 $context_selector->addOption($context_by_id_selector);
193 $context_by_mask_selector =
new ilRadioOption(
$lng->txt(
'context_by_mask'),
'se_context_by_mask');
194 $context_by_mask_selector->
setValue($event[
'subject_id']);
195 $context_selector->addOption($context_by_mask_selector);
197 $context_selector->setValue($event[
'subject_id']);
198 $form->addItem($context_selector);
This class represents an option in a radio group.
addStaticInputItems($lng, $input_vars, $form)
__construct($form_action)
ilWorkflowLauncherGUI constructor.
getRepositoryObjectSelector($config)
setValue($a_value)
Set Value.
if(!is_array($argv)) $options
This class represents a text property in a property form.
Create styles array
The data for the language used.
setValue($a_value)
Set Value.
getForm($input_vars, $event_definition)
addStartEventInputItems($lng, $event, $form)