2 namespace TYPO3\CMS\Core\Configuration\FlexForm;
60 'parentTagMap' => array(
62 'sheet' =>
'language',
63 'language' =>
'field',
67 'el:_IS_NUM' =>
'section',
68 'section' =>
'itemType'
70 'disableTypeAttrib' => 2
99 if (!is_array(
$GLOBALS[
'TCA'][$table]) || !is_array(
$GLOBALS[
'TCA'][$table][
'columns'][$field])) {
100 return 'TCA table/field was not defined.';
106 if (is_array($dataStructArray)) {
108 $xmlData = $row[$field];
110 if ($this->convertCharset) {
112 $storeInCharset = strtolower($xmlHeaderAttributes[
'encoding']);
113 if ($storeInCharset) {
114 $currentCharset =
$GLOBALS[
'LANG']->charSet;
115 $xmlData =
$GLOBALS[
'LANG']->csConvObj->conv($xmlData, $storeInCharset, $currentCharset, 1);
119 if (!is_array($editData)) {
120 return 'Parsing error: ' . $editData;
123 if (is_array($dataStructArray[
'sheets'])) {
124 $sKeys = array_keys($dataStructArray[
'sheets']);
126 $sKeys = array(
'sDEF');
129 foreach ($sKeys as $sheet) {
132 if (is_array($dataStruct[
'ROOT']) && is_array($dataStruct[
'ROOT'][
'el'])) {
133 $PA[
'vKeys'] = array(
'DEF');
134 $PA[
'lKey'] =
'lDEF';
135 $PA[
'callBackMethod_value'] = $callBackMethod_value;
136 $PA[
'table'] = $table;
137 $PA[
'field'] = $field;
138 $PA[
'uid'] = $row[
'uid'];
139 $this->traverseFlexFormXMLData_DS = &$dataStruct;
140 $this->traverseFlexFormXMLData_Data = &$editData;
144 return 'Data Structure ERROR: No ROOT element found for sheet "' . $sheet .
'".';
148 return 'Data Structure ERROR: ' . $dataStructArray;
163 if (is_array($dataStruct)) {
164 foreach ($dataStruct as $key => $value) {
166 if (is_array($value)) {
167 if ($value[
'type'] ==
'array') {
169 if ($value[
'section']) {
171 if (is_array($editData[$key][
'el'])) {
172 if ($this->reNumberIndexesOfSectionData) {
175 foreach ($editData[$key][
'el'] as $v3) {
178 $editData[$key][
'el'] = $temp;
180 foreach ($editData[$key][
'el'] as $k3 => $v3) {
184 $theDat = $v3[$theType];
185 $newSectionEl = $value[
'el'][$theType];
186 if (is_array($newSectionEl)) {
194 if (is_array($editData) && is_array($editData[$key])) {
198 }
elseif (is_array($value[
'TCEforms'][
'config'])) {
200 foreach ($PA[
'vKeys'] as $vKey) {
203 if ($PA[
'callBackMethod_value'] && is_array($editData) && is_array($editData[$key])) {
204 $this->
executeCallBackMethod($PA[
'callBackMethod_value'], array($value, $editData[$key][$vKey], $PA, $path .
'/' . $key .
'/' . $vKey, $this));
222 return call_user_func_array(array($this->callBackObj, $methodName), $parameterArray);
234 $isL = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded(
'static_info_tables');
236 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
237 'language_isocode,static_lang_isocode,title,uid',
247 'title' =>
'Default language',
250 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
251 $output[$row[
'uid']] = $row;
252 if (!empty($row[
'language_isocode'])) {
253 $output[$row[
'uid']][
'ISOcode'] = $row[
'language_isocode'];
254 }
elseif ($isL && $row[
'static_lang_isocode']) {
255 \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
'Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
257 if ($rr[
'lg_iso_2']) {
258 $output[$row[
'uid']][
'ISOcode'] = $rr[
'lg_iso_2'];
261 if (!$output[$row[
'uid']][
'ISOcode']) {
262 unset($output[$row[
'uid']]);
265 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
289 $flexObj->reNumberIndexesOfSectionData =
true;
290 $flexObj->traverseFlexFormXMLData($table, $field, $row, $this,
'cleanFlexFormXML_callBackFunction');
325 if (!is_array($pathArray)) {
326 $pathArray = explode(
'/', $pathArray);
328 if (is_array($array) && !empty($pathArray)) {
329 $key = array_shift($pathArray);
330 if (isset($array[$key])) {
331 if (empty($pathArray)) {
351 if (!is_array($pathArray)) {
352 $pathArray = explode(
'/', $pathArray);
354 if (is_array($array) && !empty($pathArray)) {
355 $key = array_shift($pathArray);
356 if (empty($pathArray)) {
357 $array[$key] = $value;
360 if (!isset($array[$key])) {
361 $array[$key] = array();
377 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'flexformForceCDATA']) {
378 $this->flexArray2Xml_options[
'useCDATA'] = 1;
380 $options =
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'niceFlexFormXMLtags'] ? $this->flexArray2Xml_options : array();
381 $spaceInd =
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'compactFlexFormXML'] ? -1 : 4;
384 $output =
'<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . LF . $output;