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($elementsOrValues)) {
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) {
257 $element->setRandomIdentifier($identifier);
259 $element->setPosition($position++);
261 if ($this->
getContext() == self::CONTEXT_MAINTAIN_HIERARCHY) {
262 $element->setIndentation($value);
264 $element->setContent($value);
267 if ($this->
getContext() == self::CONTEXT_MAINTAIN_ELEMENT_IMAGE) {
274 $elements[$identifier] = $element;
294 if (!isset($fileUpload[$property]) || !strlen($fileUpload[$property])) {
298 return $fileUpload[$property];
305 if (!isset($uploadFiles[$identifier])) {
309 return $uploadFiles[$identifier];
316 return $submittedUploadFiles;
321 foreach ($submittedUploadFiles as $identifier => $uploadProperties) {
322 if (!isset($uploadProperties[
'tmp_name'])) {
323 unset($submittedUploadFiles[$identifier]);
327 if (!strlen($uploadProperties[
'tmp_name'])) {
328 unset($submittedUploadFiles[$identifier]);
332 if (!is_uploaded_file($uploadProperties[
'tmp_name'])) {
333 unset($submittedUploadFiles[$identifier]);
338 return $submittedUploadFiles;
346 $submittedUploadFiles = array();
349 foreach ($valueElement as $elementIdentifier => $uploadValue) {
350 if (!isset($submittedUploadFiles[$elementIdentifier])) {
351 $submittedUploadFiles[$elementIdentifier] = array();
354 $submittedUploadFiles[$elementIdentifier][$uploadProperty] = $uploadValue;
358 return $submittedUploadFiles;
376 if (!isset(
$_POST[
'cmd']) || !is_array(
$_POST[
'cmd'])) {
392 $identifierArr = $fieldArr[$this->
getPostVar()];
394 return key($identifierArr) == $identifier;
setImagePathFs($imagePathFs)
setImagePathWeb($imagePathWeb)
getPresentationImageUrl()
setImageThumbnailPrefix($imageThumbnailPrefix)