ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMultipleImagesAdditionalIndexLevelRemover Class Reference
+ Inheritance diagram for ilMultipleImagesAdditionalIndexLevelRemover:
+ Collaboration diagram for ilMultipleImagesAdditionalIndexLevelRemover:

Public Member Functions

 getPostVar ()
 
 setPostVar ($postVar)
 
 manipulateFormInputValues ($inputValues)
 
 manipulateFormSubmitValues ($submitValues)
 

Protected Member Functions

 getFilesSubmissionProperties ()
 
 isSubFieldAvailable ($values, $subFieldName)
 
 isIteratorSubfieldAvailable ($values)
 
 isUploadSubfieldAvailable ($values)
 
 removeAdditionalSubFieldsLevelFromSubmitValues ($values)
 
 removeAdditionalSubFieldsLevelFromFilesSubmitProperty ($uploadProperty)
 
 removeAdditionalSubFieldsLevelFromFilesSubmit ($filesSubmit)
 

Protected Attributes

 $filesSubmissionProperties
 
 $postVar
 

Detailed Description

Member Function Documentation

◆ getFilesSubmissionProperties()

ilMultipleImagesAdditionalIndexLevelRemover::getFilesSubmissionProperties ( )
protected

◆ getPostVar()

ilMultipleImagesAdditionalIndexLevelRemover::getPostVar ( )

Definition at line 20 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References $postVar.

Referenced by manipulateFormSubmitValues().

+ Here is the caller graph for this function:

◆ isIteratorSubfieldAvailable()

ilMultipleImagesAdditionalIndexLevelRemover::isIteratorSubfieldAvailable (   $values)
protected

Definition at line 69 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References isSubFieldAvailable(), and ilMultipleImagesInputGUI\ITERATOR_SUBFIELD_NAME.

Referenced by removeAdditionalSubFieldsLevelFromSubmitValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSubFieldAvailable()

ilMultipleImagesAdditionalIndexLevelRemover::isSubFieldAvailable (   $values,
  $subFieldName 
)
protected

Definition at line 49 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

Referenced by isIteratorSubfieldAvailable(), and isUploadSubfieldAvailable().

50  {
51  if( !is_array($values) )
52  {
53  return false;
54  }
55 
56  if( !isset($values[$subFieldName]) )
57  {
58  return false;
59  }
60 
61  if( !is_array($values[$subFieldName]) )
62  {
63  return false;
64  }
65 
66  return true;
67  }
+ Here is the caller graph for this function:

◆ isUploadSubfieldAvailable()

ilMultipleImagesAdditionalIndexLevelRemover::isUploadSubfieldAvailable (   $values)
protected

◆ manipulateFormInputValues()

ilMultipleImagesAdditionalIndexLevelRemover::manipulateFormInputValues (   $inputValues)
Parameters
array$inputValues
Returns
array $inputValues

Implements ilFormValuesManipulator.

Definition at line 34 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

35  {
36  return $inputValues;
37  }

◆ manipulateFormSubmitValues()

ilMultipleImagesAdditionalIndexLevelRemover::manipulateFormSubmitValues (   $submitValues)
Parameters
array$submitValues
Returns
array $submitValues

Implements ilFormValuesManipulator.

Definition at line 39 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References getPostVar(), removeAdditionalSubFieldsLevelFromFilesSubmit(), and removeAdditionalSubFieldsLevelFromSubmitValues().

+ Here is the call graph for this function:

◆ removeAdditionalSubFieldsLevelFromFilesSubmit()

ilMultipleImagesAdditionalIndexLevelRemover::removeAdditionalSubFieldsLevelFromFilesSubmit (   $filesSubmit)
protected

Definition at line 123 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References getFilesSubmissionProperties(), and removeAdditionalSubFieldsLevelFromFilesSubmitProperty().

Referenced by manipulateFormSubmitValues().

124  {
125  foreach($this->getFilesSubmissionProperties() as $uploadProperty)
126  {
127  if( !isset($filesSubmit[$uploadProperty]) )
128  {
129  continue;
130  }
131 
132  $filesSubmit[$uploadProperty] = $this->removeAdditionalSubFieldsLevelFromFilesSubmitProperty(
133  $filesSubmit[$uploadProperty]
134  );
135  }
136 
137  return $filesSubmit;
138  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAdditionalSubFieldsLevelFromFilesSubmitProperty()

ilMultipleImagesAdditionalIndexLevelRemover::removeAdditionalSubFieldsLevelFromFilesSubmitProperty (   $uploadProperty)
protected

Definition at line 103 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References isUploadSubfieldAvailable().

Referenced by removeAdditionalSubFieldsLevelFromFilesSubmit().

104  {
105  if( !$this->isUploadSubfieldAvailable($uploadProperty) )
106  {
107  return $uploadProperty;
108  }
109 
110  foreach($uploadProperty as $subField => $submittedFile )
111  {
112  foreach($submittedFile as $identifier => $uploadValue)
113  {
114  $uploadProperty[$identifier] = $uploadValue;
115  }
116 
117  unset($uploadProperty[$subField]);
118  }
119 
120  return $uploadProperty;
121  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAdditionalSubFieldsLevelFromSubmitValues()

ilMultipleImagesAdditionalIndexLevelRemover::removeAdditionalSubFieldsLevelFromSubmitValues (   $values)
protected

Definition at line 79 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

References array, isIteratorSubfieldAvailable(), ilMultipleImagesInputGUI\ITERATOR_SUBFIELD_NAME, and ilMultipleImagesInputGUI\STORED_IMAGE_SUBFIELD_NAME.

Referenced by manipulateFormSubmitValues().

80  {
81  if( !$this->isIteratorSubfieldAvailable($values) )
82  {
83  return $values;
84  }
85 
87  $actualValues = array();
88 
89  foreach($values[ilMultipleImagesInputGUI::ITERATOR_SUBFIELD_NAME] as $index => $value)
90  {
91  if( !isset($storedImages[$index]) )
92  {
93  $actualValues[$index] = '';
94  continue;
95  }
96 
97  $actualValues[$index] = $storedImages[$index];
98  }
99 
100  return $actualValues;
101  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPostVar()

ilMultipleImagesAdditionalIndexLevelRemover::setPostVar (   $postVar)

Field Documentation

◆ $filesSubmissionProperties

ilMultipleImagesAdditionalIndexLevelRemover::$filesSubmissionProperties
protected
Initial value:
'name', 'tmp_name', 'type', 'error', 'size'
)

Definition at line 14 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

Referenced by getFilesSubmissionProperties().

◆ $postVar

ilMultipleImagesAdditionalIndexLevelRemover::$postVar
protected

Definition at line 18 of file class.ilMultipleImagesAdditionalIndexLevelRemover.php.

Referenced by getPostVar(), and setPostVar().


The documentation for this class was generated from the following file: