4 require_once
'Services/Form/interfaces/interface.ilFormValuesManipulator.php';
150 $postVar .= self::INDENTATIONS_POSTVAR_SUFFIX;
151 $postVar .= self::INDENTATIONS_POSTVAR_SUFFIX_JS;
158 if (!count($elements_or_values)) {
171 return $elementsOrValues;
178 foreach ($elements as $identifier => $orderingElement) {
180 case self::CONTEXT_MAINTAIN_ELEMENT_TEXT:
185 case self::CONTEXT_MAINTAIN_ELEMENT_IMAGE:
190 case self::CONTEXT_MAINTAIN_HIERARCHY:
223 'answer_id' => $element->
getId(),
233 if (!count($valuesOrElements)) {
246 return $valuesOrElements;
255 foreach ($values as $identifier => $value) {
258 $element->setRandomIdentifier($identifier);
260 $element->setPosition($position++);
262 if ($this->
getContext() == self::CONTEXT_MAINTAIN_HIERARCHY) {
263 $element->setIndentation($value);
265 $element->setContent($value);
268 if ($this->
getContext() == self::CONTEXT_MAINTAIN_ELEMENT_IMAGE) {
275 $elements[$identifier] = $element;
295 if (!array_key_exists($property, $fileUpload)) {
299 return $fileUpload[$property];
306 if (!isset($uploadFiles[$identifier])) {
310 return $uploadFiles[$identifier];
317 return $submittedUploadFiles;
322 foreach ($submittedUploadFiles as $identifier => $uploadProperties) {
323 if (!isset($uploadProperties[
'tmp_name'])) {
324 unset($submittedUploadFiles[$identifier]);
328 if (!strlen($uploadProperties[
'tmp_name'])) {
329 unset($submittedUploadFiles[$identifier]);
333 if (!is_uploaded_file($uploadProperties[
'tmp_name'])) {
334 unset($submittedUploadFiles[$identifier]);
339 return $submittedUploadFiles;
347 $submittedUploadFiles = array();
350 foreach ($valueElement as $elementIdentifier => $uploadValue) {
351 if (!isset($submittedUploadFiles[$elementIdentifier])) {
352 $submittedUploadFiles[$elementIdentifier] = array();
355 $submittedUploadFiles[$elementIdentifier][$uploadProperty] = $uploadValue;
359 return $submittedUploadFiles;
377 if (!isset(
$_POST[
'cmd']) || !is_array(
$_POST[
'cmd'])) {
393 $identifierArr = $fieldArr[$this->
getPostVar()];
395 return key($identifierArr) == $identifier;
setImagePathFs($imagePathFs)
setImagePathWeb($imagePathWeb)
getPresentationImageUrl()
setImageThumbnailPrefix($imageThumbnailPrefix)