ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Form/interfaces/interface.ilFormValuesManipulator.php';
5
13{
14 public function manipulateFormInputValues($inputValues)
15 {
16 return $inputValues;
17 }
18
19 public function manipulateFormSubmitValues($submitValues)
20 {
21 return $this->fetchIndentationsFromSubmitValues($submitValues);
22 }
23
24 protected function hasContentSubLevel($values)
25 {
26 if (!is_array($values) || !isset($values['content'])) {
27 return false;
28 }
29
30 return true;
31 }
32
33 protected function hasIndentationsSubLevel($values)
34 {
35 if (!is_array($values) || !isset($values['indentation'])) {
36 return false;
37 }
38
39 return true;
40 }
41
43 {
45 $actualValues = array();
46
47 foreach ($values['content'] as $key => $value) {
48 if (!isset($values['indentation'][$key])) {
49 $actualValues[$key] = null;
50 continue;
51 }
52
53 $actualValues[$key] = $values['indentation'][$key];
54 }
55 } else {
56 $actualValues = $values;
57 }
58
59 return $actualValues;
60 }
61}
An exception for terminatinating execution or to throw for unit testing.
$key
Definition: croninfo.php:18
$values