2 namespace TYPO3\CMS\Backend\Form\Element;
76 parent::__construct($nodeFactory, $data);
79 $this->nodeFactory = $nodeFactory;
87 return !empty($this->data[
'disabledWizards']);
98 $compensationForLargeDocuments = 1.33;
99 $compensationForFormFields = 12;
101 $size = round($size * $compensationForLargeDocuments);
102 return ceil($size * $compensationForFormFields);
126 protected function renderWizards($itemKinds, $wizConf, $table, $row, $field, $PA, $itemName, $specConf, $RTE =
false)
130 return $itemKinds[0];
135 $fieldChangeFunc = $PA[
'fieldChangeFunc'];
136 $item = $itemKinds[0];
137 $md5ID =
'ID' . GeneralUtility::shortmd5($itemName);
138 $prefixOfFormElName =
'data[' . $table .
'][' . $row[
'uid'] .
'][' . $field .
']';
141 $flexFormPath = str_replace(
'][',
'/', substr($PA[
'itemFormElName'], strlen($prefixOfFormElName) + 1, -1));
145 if ($PA[
'fieldConf'][
'config'][
'type'] ===
'select' && (
int)$PA[
'fieldConf'][
'config'][
'maxitems'] > 1 && $PA[
'fieldConf'][
'config'][
'renderType'] ===
'selectSingleBox') {
150 $wizardsEnabledByType = $specConf[
'wizards'][
'parameters'];
152 $buttonWizards = array();
153 $otherWizards = array();
154 foreach ($wizConf as $wizardIdentifier => $wizardConfiguration) {
155 if (!isset($wizardConfiguration[
'module'][
'name']) && isset($wizardConfiguration[
'script'])) {
156 throw new \InvalidArgumentException(
'The way registering a wizard in TCA has changed in 6.2 and was removed in CMS 7. '
157 .
'Please set module[name]=module_name instead of using script=path/to/script.php in your TCA. ', 1437750231);
161 if ($wizardIdentifier[0] ===
'_') {
166 $wizardConfiguration[
'type'] = (string)$wizardConfiguration[
'type'];
170 $wizardIsEnabled =
true;
172 isset($wizardConfiguration[
'enableByTypeConfig'])
173 && (bool)$wizardConfiguration[
'enableByTypeConfig']
174 && (!is_array($wizardsEnabledByType) || !in_array($wizardIdentifier, $wizardsEnabledByType))
176 $wizardIsEnabled =
false;
179 if (isset($wizardConfiguration[
'RTEonly']) && (bool)$wizardConfiguration[
'RTEonly'] && !$RTE) {
180 $wizardIsEnabled =
false;
184 $wizardIsEnabled =
false;
187 if (!isset($wizardConfiguration[
'module'][
'name']) && in_array($wizardConfiguration[
'type'], array(
'script',
'colorbox',
'popup'),
true)) {
188 $wizardIsEnabled =
false;
191 if (!$wizardIsEnabled) {
196 $iTitle = htmlspecialchars($languageService->sL($wizardConfiguration[
'title']));
197 if (isset($wizardConfiguration[
'icon'])) {
203 switch ($wizardConfiguration[
'type']) {
206 $params[
'params'] = $wizardConfiguration[
'params'];
207 $params[
'exampleImg'] = $wizardConfiguration[
'exampleImg'];
208 $params[
'table'] = $table;
209 $params[
'uid'] = $row[
'uid'];
210 $params[
'pid'] = $row[
'pid'];
211 $params[
'field'] = $field;
212 $params[
'flexFormPath'] = $flexFormPath;
213 $params[
'md5ID'] = $md5ID;
214 $params[
'returnUrl'] = $this->data[
'returnUrl'];
216 $params[
'formName'] =
'editform';
217 $params[
'itemName'] = $itemName;
219 $params[
'fieldChangeFunc'] = $fieldChangeFunc;
222 $params[
'item'] = &$item;
223 $params[
'icon'] = $icon;
224 $params[
'iTitle'] = $iTitle;
225 $params[
'wConf'] = $wizardConfiguration;
226 $params[
'row'] = $row;
232 $params[
'params'] = $wizardConfiguration[
'params'];
233 $params[
'exampleImg'] = $wizardConfiguration[
'exampleImg'];
234 $params[
'table'] = $table;
235 $params[
'uid'] = $row[
'uid'];
236 $params[
'pid'] = $row[
'pid'];
237 $params[
'field'] = $field;
238 $params[
'flexFormPath'] = $flexFormPath;
239 $params[
'md5ID'] = $md5ID;
240 $params[
'returnUrl'] = $this->data[
'returnUrl'];
243 $urlParameters = array();
244 if (isset($wizardConfiguration[
'module'][
'urlParameters']) && is_array($wizardConfiguration[
'module'][
'urlParameters'])) {
245 $urlParameters = $wizardConfiguration[
'module'][
'urlParameters'];
247 $wScript = BackendUtility::getModuleUrl($wizardConfiguration[
'module'][
'name'], $urlParameters,
'');
250 '<a class="btn btn-default" href="' . htmlspecialchars(
$url) .
'" onclick="this.blur(); return !TBE_EDITOR.isFormChanged();">'
257 $params[
'params'] = $wizardConfiguration[
'params'];
258 $params[
'exampleImg'] = $wizardConfiguration[
'exampleImg'];
259 $params[
'table'] = $table;
260 $params[
'uid'] = $row[
'uid'];
261 $params[
'pid'] = $row[
'pid'];
262 $params[
'field'] = $field;
263 $params[
'flexFormPath'] = $flexFormPath;
264 $params[
'md5ID'] = $md5ID;
265 $params[
'returnUrl'] = $this->data[
'returnUrl'];
267 $params[
'formName'] =
'editform';
268 $params[
'itemName'] = $itemName;
270 $params[
'fieldChangeFunc'] = $fieldChangeFunc;
274 $urlParameters = array();
275 if (isset($wizardConfiguration[
'module'][
'urlParameters']) && is_array($wizardConfiguration[
'module'][
'urlParameters'])) {
276 $urlParameters = $wizardConfiguration[
'module'][
'urlParameters'];
278 $wScript = BackendUtility::getModuleUrl($wizardConfiguration[
'module'][
'name'], $urlParameters,
'');
281 $onlyIfSelectedJS =
'';
282 if (isset($wizardConfiguration[
'popup_onlyOpenIfSelected']) && $wizardConfiguration[
'popup_onlyOpenIfSelected']) {
283 $notSelectedText = $languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:mess.noSelItemForEdit');
304 '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars($aOnClick) .
'">' .
311 $params[
'params'] = $wizardConfiguration[
'params'];
312 $params[
'exampleImg'] = $wizardConfiguration[
'exampleImg'];
313 $params[
'table'] = $table;
314 $params[
'uid'] = $row[
'uid'];
315 $params[
'pid'] = $row[
'pid'];
316 $params[
'field'] = $field;
317 $params[
'flexFormPath'] = $flexFormPath;
318 $params[
'md5ID'] = $md5ID;
319 $params[
'returnUrl'] = $this->data[
'returnUrl'];
321 $params[
'formName'] =
'editform';
322 $params[
'itemName'] = $itemName;
324 $params[
'fieldChangeFunc'] = $fieldChangeFunc;
328 $urlParameters = array();
329 if (isset($wizardConfiguration[
'module'][
'urlParameters']) && is_array($wizardConfiguration[
'module'][
'urlParameters'])) {
330 $urlParameters = $wizardConfiguration[
'module'][
'urlParameters'];
332 $wScript = BackendUtility::getModuleUrl($wizardConfiguration[
'module'][
'name'], $urlParameters,
'');
347 $otherWizards[] =
'<a id="' . $md5ID .
'" class="btn btn-default" href="#" onclick="' . htmlspecialchars($aOnClick) .
'"><span class="t3-icon fa fa-eyedropper"></span></a>';
351 $params[
'fieldConfig'] = $PA[
'fieldConf'][
'config'];
352 $params[
'field'] = $field;
353 $params[
'table'] = $table;
354 $params[
'flexFormPath'] = $flexFormPath;
355 $params[
'md5ID'] = $md5ID;
356 $params[
'itemName'] = $itemName;
357 $params[
'wConf'] = $wizardConfiguration;
358 $params[
'row'] = $row;
362 $otherWizards[] = $wizard->renderWizard($params);
372 if (isset($this->data[
'pageTsConfig'][
'TCEFORM.'][$table .
'.'][$field .
'.'][
'wizards.'][$wizardIdentifier .
'.'])
373 && is_array($this->data[
'pageTsConfig'][
'TCEFORM.'][$table .
'.'][$field .
'.'][
'wizards.'][$wizardIdentifier .
'.'])
375 $pageTsConfig[
'TCEFORM.'][
'dummySelectWizard.'][$wizardIdentifier .
'.'] = $this->data[
'pageTsConfig'][
'TCEFORM.'][$table .
'.'][$field .
'.'][
'wizards.'][$wizardIdentifier .
'.'];
377 $selectWizardDataInput = [
378 'tableName' =>
'dummySelectWizard',
380 'pageTsConfig' => $pageTsConfig,
384 $wizardIdentifier => [
386 'renderType' =>
'selectSingle',
387 'config' => $wizardConfiguration,
394 $formDataGroup->setProviderList([ TcaSelectItems::class ]);
397 $compilerResult = $formDataCompiler->compile($selectWizardDataInput);
398 $selectWizardItems = $compilerResult[
'processedTca'][
'columns'][$wizardIdentifier][
'config'][
'items'];
401 $options[] =
'<option>' . $iTitle .
'</option>';
402 foreach ($selectWizardItems as $selectWizardItem) {
403 $options[] =
'<option value="' . htmlspecialchars($selectWizardItem[1]) .
'">' . htmlspecialchars($selectWizardItem[0]) .
'</option>';
405 if ($wizardConfiguration[
'mode'] ==
'append') {
407 }
elseif ($wizardConfiguration[
'mode'] ==
'prepend') {
408 $assignValue =
'document.querySelectorAll(' .
GeneralUtility::quoteJSvalue(
'[data-formengine-input-name="' . $itemName .
'"]') .
')[0].value+=\'\'+this.options[this.selectedIndex].value';
410 $assignValue =
'document.querySelectorAll(' .
GeneralUtility::quoteJSvalue(
'[data-formengine-input-name="' . $itemName .
'"]') .
')[0].value=this.options[this.selectedIndex].value';
415 ' class="form-control tceforms-select tceforms-wizardselect"' .
416 ' onchange="' . htmlspecialchars($assignValue .
';this.blur();this.selectedIndex=0;' . implode(
'', $fieldChangeFunc)) .
'"' .
418 implode(
'', $options) .
422 if (!empty($PA[
'fieldTSConfig'][
'suggest.'][
'default.'][
'hide'])) {
427 $otherWizards[] = $suggestWizard->renderSuggestSelector($PA[
'itemFormElName'], $table, $field, $row, $PA);
433 if (!empty($buttonWizards) || !empty($otherWizards)) {
435 if (!empty($buttonWizards)) {
436 $innerContent .=
'<div class="btn-group' . ($wizConf[
'_VERTICAL'] ?
' btn-group-vertical' :
'') .
'">' . implode(
'', $buttonWizards) .
'</div>';
438 $innerContent .= implode(
' ', $otherWizards);
441 $classes = array(
'form-wizards-wrap');
442 if ($wizConf[
'_POSITION'] ===
'left') {
443 $classes[] =
'form-wizards-aside';
444 $innerContent =
'<div class="form-wizards-items">' . $innerContent .
'</div><div class="form-wizards-element">' . $item .
'</div>';
445 }
elseif ($wizConf[
'_POSITION'] ===
'top') {
446 $classes[] =
'form-wizards-top';
447 $innerContent =
'<div class="form-wizards-items">' . $innerContent .
'</div><div class="form-wizards-element">' . $item .
'</div>';
448 }
elseif ($wizConf[
'_POSITION'] ===
'bottom') {
449 $classes[] =
'form-wizards-bottom';
450 $innerContent =
'<div class="form-wizards-element">' . $item .
'</div><div class="form-wizards-items">' . $innerContent .
'</div>';
452 $classes[] =
'form-wizards-aside';
453 $innerContent =
'<div class="form-wizards-element">' . $item .
'</div><div class="form-wizards-items">' . $innerContent .
'</div>';
456 <div class="' . implode(
' ', $classes) .
'">
457 ' . $innerContent .
'
482 protected function dbFileIcons($fName, $mode, $allowed, $itemArray, $selector =
'', $params = array(), $onFocus =
'', $table =
'', $field =
'', $uid =
'', $config = array())
486 if ($params[
'readOnly']) {
487 $disabled =
' disabled="disabled"';
494 if (is_array($itemArray)) {
495 $itemArrayC = count($itemArray);
498 foreach ($itemArray as $pp) {
500 if (is_array($pRec)) {
502 $pUid = $pp[
'table'] .
'_' . $pp[
'id'];
504 $title = htmlspecialchars($pTitle);
505 $opt[] =
'<option value="' . htmlspecialchars($pUid) .
'" title="' . $title .
'">' . $title .
'</option>';
509 case 'file_reference':
512 foreach ($itemArray as $item) {
513 $itemParts = explode(
'|', $item);
514 $uidList[] = ($pUid = ($pTitle = $itemParts[0]));
515 $title = htmlspecialchars(rawurldecode($itemParts[1]));
516 $opt[] =
'<option value="' . htmlspecialchars(rawurldecode($itemParts[0])) .
'" title="' . $title .
'">' . $title .
'</option>';
520 foreach ($itemArray as $pp) {
521 $pParts = explode(
'|', $pp);
522 $uidList[] = ($pUid = ($pTitle = $pParts[0]));
523 $title = htmlspecialchars(rawurldecode($pParts[0]));
524 $opt[] =
'<option value="' . htmlspecialchars(rawurldecode($pParts[0])) .
'" title="' . $title .
'">' . $title .
'</option>';
528 foreach ($itemArray as $pp) {
529 $pParts = explode(
'|', $pp, 2);
530 $uidList[] = ($pUid = $pParts[0]);
531 $pTitle = $pParts[1];
532 $title = htmlspecialchars(rawurldecode($pTitle));
533 $opt[] =
'<option value="' . htmlspecialchars(rawurldecode($pUid)) .
'" title="' . $title .
'">' . $title .
'</option>';
538 $sSize = $params[
'autoSizeMax']
542 $isMultiple = $params[
'maxitems'] != 1 && $params[
'size'] != 1;
544 . ($params[
'noList'] ?
'style="display: none"' :
'size="' . $sSize .
'" class="form-control tceforms-multiselect"')
545 . ($isMultiple ?
' multiple="multiple"' :
'')
546 .
' data-formengine-input-name="' . htmlspecialchars($fName) .
'" ' . $this->
getValidationDataAsDataAttribute($config) . $onFocus . $params[
'style'] . $disabled .
'>' . implode(
'', $opt)
553 $rOnClickInline =
'';
554 if (!$params[
'readOnly'] && !$params[
'noList']) {
555 if (!$params[
'noBrowser']) {
559 $inlineStackProcessor->initializeByGivenStructure($this->data[
'inlineStructure']);
560 $aOnClickInline =
'';
561 if ($this->data[
'isInlineChild'] && $this->data[
'inlineParentUid']) {
562 if ($this->data[
'inlineParentConfig'][
'foreign_table'] === $table
563 && $this->data[
'inlineParentConfig'][
'foreign_unique'] === $field
565 $objectPrefix = $inlineStackProcessor->getCurrentStructureDomObjectIdPrefix($this->data[
'inlineFirstPid']) .
'-' . $table;
566 $aOnClickInline = $objectPrefix .
'|inline.checkUniqueElement|inline.setUniqueElement';
570 if (is_array($config[
'appearance']) && isset($config[
'appearance'][
'elementBrowserType'])) {
571 $elementBrowserType = $config[
'appearance'][
'elementBrowserType'];
573 $elementBrowserType = $mode;
575 if (is_array($config[
'appearance']) && isset($config[
'appearance'][
'elementBrowserAllowed'])) {
576 $elementBrowserAllowed = $config[
'appearance'][
'elementBrowserAllowed'];
578 $elementBrowserAllowed = $allowed;
584 onclick="' . htmlspecialchars($aOnClick) .
'"
585 class="btn btn-default"
586 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.browse_' . ($mode ==
'db' ?
'db' :
'file'))) .
'">
587 ' . $this->iconFactory->getIcon(
'actions-insert-record',
Icon::SIZE_SMALL)->render() .
'
590 if (!$params[
'dontShowMoveIcons']) {
594 class="btn btn-default t3-btn-moveoption-top"
595 data-fieldname="' . $fName .
'"
596 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.move_to_top')) .
'">
597 ' . $this->iconFactory->getIcon(
'actions-move-to-top',
Icon::SIZE_SMALL)->render() .
'
602 class="btn btn-default t3-btn-moveoption-up"
603 data-fieldname="' . $fName .
'"
604 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.move_up')) .
'">
605 ' . $this->iconFactory->getIcon(
'actions-move-up',
Icon::SIZE_SMALL)->render() .
'
609 class="btn btn-default t3-btn-moveoption-down"
610 data-fieldname="' . $fName .
'"
611 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.move_down')) .
'">
612 ' . $this->iconFactory->getIcon(
'actions-move-down',
Icon::SIZE_SMALL)->render() .
'
617 class="btn btn-default t3-btn-moveoption-bottom"
618 data-fieldname="' . $fName .
'"
619 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.move_to_bottom')) .
'">
620 ' . $this->iconFactory->getIcon(
'actions-move-to-bottom',
Icon::SIZE_SMALL)->render() .
'
625 if (!empty($clipElements)) {
627 foreach ($clipElements as $elValue) {
629 list($itemTable, $itemUid) = explode(
'|', $elValue);
632 $elValue = $itemTable .
'_' . $itemUid;
640 $aOnClick .=
'return false;';
643 onclick="' . htmlspecialchars($aOnClick) .
'"
644 title="' . htmlspecialchars(sprintf($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.clipInsert_' . ($mode ==
'db' ?
'db' :
'file')), count($clipElements))) .
'">
645 ' . $this->iconFactory->getIcon(
'actions-document-paste-into',
Icon::SIZE_SMALL)->render() .
'
649 if (!$params[
'readOnly'] && !$params[
'noDelete']) {
652 class="btn btn-default t3-btn-removeoption"
653 onClick="' . $rOnClickInline .
'"
654 data-fieldname="' . $fName .
'"
655 title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.remove_selected')) .
'">
656 ' . $this->iconFactory->getIcon(
'actions-selection-delete',
Icon::SIZE_SMALL)->render() .
'
662 if ($params[
'thumbnails'] && $params[
'allowed']) {
665 $allowedExtensionList = $params[
'allowed'];
668 foreach ($allowedExtensionList as $allowedExtension) {
676 if (is_array($params[
'thumbnails']) && !empty($params[
'thumbnails'])) {
678 $thumbnails .=
'<ul class="list-inline">';
679 foreach ($params[
'thumbnails'] as $thumbnail) {
680 $thumbnails .=
'<li><span class="thumbnail">' . $thumbnail[
'image'] .
'</span></li>';
682 $thumbnails .=
'</ul>';
684 $thumbnails .=
'<div class="table-fit"><table class="table table-white"><tbody>';
685 foreach ($params[
'thumbnails'] as $thumbnail) {
688 <td class="col-icon">
689 ' . ($config[
'internal_type'] ===
'db'
691 : $thumbnail[
'image']) .
'
693 <td class="col-title">
694 ' . ($config[
'internal_type'] ===
'db'
695 ? BackendUtility::wrapClickMenuOnIcon($thumbnail[
'name'], $thumbnail[
'table'], $thumbnail[
'uid'], 1,
'',
'+copy,info,edit,view')
696 : $thumbnail[
'name']) .
'
697 ' . ($config[
'internal_type'] ===
'db' ?
' <span class="text-muted">[' . $thumbnail[
'uid'] .
']</span>' :
'') .
'
702 $thumbnails .=
'</tbody></table></div>';
708 if (is_array($params[
'allowedTables']) && !empty($params[
'allowedTables'])) {
709 $allowedTables .=
'<div class="help-block">';
710 foreach ($params[
'allowedTables'] as $key => $item) {
711 if (is_array($item)) {
712 if (empty($params[
'readOnly'])) {
713 $allowedTables .=
'<a href="#" onClick="' . htmlspecialchars($item[
'onClick']) .
'" class="btn btn-default">' . $item[
'icon'] .
' ' . htmlspecialchars($item[
'name']) .
'</a> ';
715 $allowedTables .=
'<span>' . htmlspecialchars($item[
'name']) .
'</span> ';
717 }
elseif ($key ===
'name') {
718 $allowedTables .=
'<span>' . htmlspecialchars($item) .
'</span> ';
721 $allowedTables .=
'</div>';
725 if (is_array($params[
'allowed']) && !empty($params[
'allowed'])) {
726 foreach ($params[
'allowed'] as $item) {
727 $allowedList .=
'<span class="label label-success">' . strtoupper($item) .
'</span> ';
731 $disallowedList =
'';
732 if (is_array($params[
'disallowed']) && !empty($params[
'disallowed'])) {
733 foreach ($params[
'disallowed'] as $item) {
734 $disallowedList .=
'<span class="label label-danger">' . strtoupper($item) .
'</span> ';
738 $rightbox = ($params[
'rightbox'] ?:
'');
741 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_tceforms.php'][
'dbFileIcons'])) {
742 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_tceforms.php'][
'dbFileIcons'] as $classRef) {
744 if (!$hookObject instanceof DatabaseFileIconsHookInterface) {
745 throw new \UnexpectedValueException(
'$hookObject must implement interface ' . DatabaseFileIconsHookInterface::class, 1290167704);
747 $additionalParams = array(
749 'allowed' => $allowed,
750 'itemArray' => $itemArray,
751 'onFocus' => $onFocus,
755 'config' =>
$GLOBALS[
'TCA'][$table][
'columns'][$field]
757 $hookObject->dbFileIcons_postProcess($params, $selector, $thumbnails, $icons, $rightbox, $fName, $uidList, $additionalParams, $this);
763 ' . ($params[
'headers'][
'selector'] ?
'<label>' . $params[
'headers'][
'selector'] .
'</label>' :
'') .
'
764 <div class="form-wizards-wrap form-wizards-aside">
765 <div class="form-wizards-element">
767 ' . (!$params[
'noList'] && !empty($allowedTables) ? $allowedTables :
'') .
'
768 ' . (!$params[
'noList'] && (!empty($allowedList) || !empty($disallowedList))
769 ?
'<div class="help-block">' . $allowedList . $disallowedList .
' </div>'
772 ' . (!empty($icons[
'L']) ?
'<div class="form-wizards-items"><div class="btn-group-vertical">' . implode(
'', $icons[
'L']) .
'</div></div>' :
'') .
'
773 ' . (!empty($icons[
'R']) ?
'<div class="form-wizards-items"><div class="btn-group-vertical">' . implode(
'', $icons[
'R']) .
'</div></div>' :
'') .
'
778 <div class="form-multigroup-wrap t3js-formengine-field-group">
779 <div class="form-multigroup-item form-multigroup-element">' . $str .
'</div>
780 <div class="form-multigroup-item form-multigroup-element">
781 ' . ($params[
'headers'][
'items'] ?
'<label>' . $params[
'headers'][
'items'] .
'</label>' :
'') .
'
782 ' . ($params[
'headers'][
'selectorbox'] ?
'<div class="form-multigroup-item-wizard">' . $params[
'headers'][
'selectorbox'] .
'</div>' :
'') .
'
791 $str .=
'<input type="hidden" name="' . $fName .
'" value="' . htmlspecialchars(implode(
',', $uidList)) .
'" />';
804 if (!is_object($this->clipboard)) {
806 $this->clipboard->initializeClipboard();
811 case 'file_reference':
814 $elFromTable = $this->clipboard->elFromTable(
'_FILE');
818 foreach ($elFromTable as $elValue) {
819 $pI = pathinfo($elValue);
820 $ext = strtolower($pI[
'extension']);
821 if (in_array($ext, $allowedExts)) {
822 $output[] = $elValue;
828 $output = $elFromTable;
834 if (trim($allowedTables[0]) ===
'*') {
835 $output = $this->clipboard->elFromTable(
'');
838 foreach ($allowedTables as $tablename) {
839 $elFromTable = $this->clipboard->elFromTable($tablename);
840 $output = array_merge($output, $elFromTable);
843 $output = array_keys($output);