ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
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
4
require_once
'Services/Form/interfaces/interface.ilFormValuesManipulator.php'
;
5
12
class
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover
implements
ilFormValuesManipulator
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
42
protected
function
fetchIndentationsFromSubmitValues
(
$values
)
43
{
44
if
($this->
hasContentSubLevel
(
$values
) && $this->
hasIndentationsSubLevel
(
$values
)) {
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
}
ilFormValuesManipulator
Definition:
interface.ilFormValuesManipulator.php:10
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover\fetchIndentationsFromSubmitValues
fetchIndentationsFromSubmitValues($values)
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:42
$values
$values
Definition:
testOperations.php:7
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover\manipulateFormSubmitValues
manipulateFormSubmitValues($submitValues)
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:19
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover\manipulateFormInputValues
manipulateFormInputValues($inputValues)
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:14
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover\hasContentSubLevel
hasContentSubLevel($values)
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:24
php
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover\hasIndentationsSubLevel
hasIndentationsSubLevel($values)
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:33
ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover
Definition:
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php:12
$key
$key
Definition:
croninfo.php:18
Services
Form
classes
class.ilMultipleNestedOrderingElementsAdditionalIndexLevelRemover.php
Generated on Thu Jan 16 2025 19:02:22 for ILIAS by
1.8.13 (using
Doxyfile
)