39 $table = $this->data[
'tableName'];
40 $row = $this->data[
'databaseRow'];
41 $fieldName = $this->data[
'fieldName'];
42 $flexFormFormPrefix = $this->data[
'flexFormFormPrefix'];
43 $flexFormContainerElementCollapsed = $this->data[
'flexFormContainerElementCollapsed'];
44 $flexFormDataStructureArray = $this->data[
'flexFormDataStructureArray'];
45 $parameterArray = $this->data[
'parameterArray'];
47 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
48 $toggleIcons =
'<span class="t3js-flex-control-toggle-icon-open" style="' . ($flexFormContainerElementCollapsed ?
'display: none;' :
'') .
'">'
49 . $iconFactory->getIcon(
'actions-view-list-collapse',
Icon::SIZE_SMALL)->render()
51 $toggleIcons .=
'<span class="t3js-flex-control-toggle-icon-close" style="' . ($flexFormContainerElementCollapsed ?
'' :
'display: none;') .
'">'
55 $flexFormContainerIdentifier = $this->data[
'flexFormContainerIdentifier'];
56 $actionFieldName =
'_ACTION_FLEX_FORM'
57 . $parameterArray[
'itemFormElName']
58 . $this->data[
'flexFormFormPrefix']
60 .
'[' . $flexFormContainerIdentifier .
']';
61 $toggleFieldName =
'data[' . $table .
'][' . $row[
'uid'] .
'][' . $fieldName .
']'
63 .
'[' . $flexFormContainerIdentifier .
']'
66 $moveAndDeleteContent = [];
68 if ($userHasAccessToDefaultLanguage) {
69 $moveAndDeleteContent[] =
'<span class="btn btn-default t3js-sortable-handle"><span title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:sortable.dragmove')) .
'">' . $iconFactory->getIcon(
'actions-move-move',
Icon::SIZE_SMALL)->render() .
'</span></span>';
70 $moveAndDeleteContent[] =
'<span class="btn btn-default t3js-delete"><span title="' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:delete')) .
'">' . $iconFactory->getIcon(
'actions-edit-delete',
Icon::SIZE_SMALL)->render() .
'</span></span>';
75 $options[
'flexFormFormPrefix'] = $flexFormFormPrefix .
'[' . $flexFormContainerIdentifier .
'][' . $this->data[
'flexFormContainerName'] .
'][el]';
76 $options[
'flexFormDataStructureArray'] = $flexFormDataStructureArray[
'el'];
77 $options[
'renderType'] =
'flexFormElementContainer';
78 $containerContentResult = $this->nodeFactory->create($options)->render();
81 if (!empty(trim($flexFormDataStructureArray[
'title']))) {
82 $containerTitle = $languageService->sL(trim($flexFormDataStructureArray[
'title']));
88 $html[] =
'<div class="t3-form-field-container-flexsections t3-flex-section t3js-flex-section">';
89 $html[] =
'<input class="t3-flex-control t3js-flex-control-action" type="hidden" name="' . htmlspecialchars($actionFieldName) .
'" value="" />';
90 $html[] =
'<div class="panel panel-default panel-condensed">';
91 $html[] =
'<div class="panel-heading t3js-flex-section-header" data-toggle="formengine-flex">';
92 $html[] =
'<div class="form-irre-header">';
93 $html[] =
'<div class="form-irre-header-cell form-irre-header-icon">';
94 $html[] = $toggleIcons;
96 $html[] =
'<div class="form-irre-header-cell form-irre-header-body">';
97 $html[] =
'<span class="t3js-record-title">' . htmlspecialchars($containerTitle) .
'</span>';
99 $html[] =
'<div class="form-irre-header-cell form-irre-header-control">';
100 $html[] =
'<div class="btn-group btn-group-sm">';
101 $html[] = implode(LF, $moveAndDeleteContent);
106 $html[] =
'<div class="panel-collapse t3js-flex-section-content"' . ($flexFormContainerElementCollapsed ?
' style="display:none;"' :
'') .
'>';
107 $html[] = $containerContentResult[
'html'];
110 $html[] =
'class="t3-flex-control t3js-flex-control-toggle"';
111 $html[] =
'type="hidden"';
112 $html[] =
'name="' . htmlspecialchars($toggleFieldName) .
'"';
113 $html[] =
'value="' . ($flexFormContainerElementCollapsed ?
'1' :
'0') .
'"';
118 $resultArray[
'html'] = implode(LF, $html);