56 'parentTagMap' => array(
58 'sheet' =>
'language',
59 'language' =>
'field',
63 'el:_IS_NUM' =>
'section',
64 'section' =>
'itemType' 66 'disableTypeAttrib' => 2
94 if (!is_array(
$GLOBALS[
'TCA'][$table]) || !is_array(
$GLOBALS[
'TCA'][$table][
'columns'][$field])) {
95 return 'TCA table/field was not defined.';
101 if (is_array($dataStructArray)) {
103 $xmlData = $row[$field];
105 if ($this->convertCharset) {
107 $storeInCharset = strtolower($xmlHeaderAttributes[
'encoding']);
108 if ($storeInCharset) {
109 $currentCharset =
$GLOBALS[
'LANG']->charSet;
110 $xmlData =
$GLOBALS[
'LANG']->csConvObj->conv($xmlData, $storeInCharset, $currentCharset, 1);
114 if (!is_array($editData)) {
115 return 'Parsing error: ' . $editData;
118 $langChildren = $dataStructArray[
'meta'][
'langChildren'] ? 1 : 0;
119 $langDisabled = $dataStructArray[
'meta'][
'langDisable'] ? 1 : 0;
121 if (!is_array($editData[
'meta'])) {
122 $editData[
'meta'] = array();
124 $editData[
'meta'][
'currentLangId'] = array();
126 foreach ($languages as $lInfo) {
127 $editData[
'meta'][
'currentLangId'][] = $lInfo[
'ISOcode'];
129 if (!count($editData[
'meta'][
'currentLangId'])) {
130 $editData[
'meta'][
'currentLangId'] = array(
'DEF');
132 $editData[
'meta'][
'currentLangId'] = array_unique($editData[
'meta'][
'currentLangId']);
133 if ($langChildren || $langDisabled) {
134 $lKeys = array(
'DEF');
136 $lKeys = $editData[
'meta'][
'currentLangId'];
139 if (is_array($dataStructArray[
'sheets'])) {
140 $sKeys = array_keys($dataStructArray[
'sheets']);
142 $sKeys = array(
'sDEF');
145 foreach ($lKeys as $lKey) {
146 foreach ($sKeys as $sheet) {
147 $sheetCfg = $dataStructArray[
'sheets'][$sheet];
150 if (is_array($dataStruct[
'ROOT']) && is_array($dataStruct[
'ROOT'][
'el'])) {
153 $PA[
'vKeys'] = $langChildren && !$langDisabled ? $editData[
'meta'][
'currentLangId'] : array(
'DEF');
155 $PA[
'callBackMethod_value'] = $callBackMethod_value;
156 $PA[
'table'] = $table;
157 $PA[
'field'] = $field;
158 $PA[
'uid'] = $row[
'uid'];
159 $this->traverseFlexFormXMLData_DS = &$dataStruct;
160 $this->traverseFlexFormXMLData_Data = &$editData;
164 return 'Data Structure ERROR: No ROOT element found for sheet "' . $sheet .
'".';
169 return 'Data Structure ERROR: ' . $dataStructArray;
184 if (is_array($dataStruct)) {
185 foreach ($dataStruct as $key => $value) {
187 if (is_array($value)) {
188 if ($value[
'type'] ==
'array') {
190 if ($value[
'section']) {
192 if (is_array($editData[$key][
'el'])) {
193 if ($this->reNumberIndexesOfSectionData) {
196 foreach ($editData[$key][
'el'] as $v3) {
199 $editData[$key][
'el'] = $temp;
201 foreach ($editData[$key][
'el'] as $k3 => $v3) {
205 $theDat = $v3[$theType];
206 $newSectionEl = $value[
'el'][$theType];
207 if (is_array($newSectionEl)) {
215 if (is_array($editData) && is_array($editData[$key])) {
219 } elseif (is_array($value[
'TCEforms'][
'config'])) {
221 foreach ($PA[
'vKeys'] as $vKey) {
224 if ($PA[
'callBackMethod_value'] && is_array($editData) && is_array($editData[$key])) {
225 $this->
executeCallBackMethod($PA[
'callBackMethod_value'], array($value, $editData[$key][$vKey], $PA, $path .
'/' . $key .
'/' . $vKey, $this));
242 return call_user_func_array(array($this->callBackObj, $methodName), $parameterArray);
259 'title' =>
'Default language',
262 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
263 $output[$row[
'uid']] = $row;
264 if ($isL && $row[
'static_lang_isocode']) {
265 $rr = BackendUtility::getRecord(
'static_languages', $row[
'static_lang_isocode'],
'lg_iso_2');
266 if ($rr[
'lg_iso_2']) {
267 $output[$row[
'uid']][
'ISOcode'] = $rr[
'lg_iso_2'];
270 if (!$output[$row[
'uid']][
'ISOcode']) {
271 unset($output[$row[
'uid']]);
274 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
298 $flexObj->reNumberIndexesOfSectionData = TRUE;
299 $flexObj->traverseFlexFormXMLData($table, $field, $row, $this,
'cleanFlexFormXML_callBackFunction');
319 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'flexFormXMLincludeDiffBase']) {
320 $vDEFbase = $pObj->getArrayValueByPath($path .
'.vDEFbase', $pObj->traverseFlexFormXMLData_Data);
321 if (isset($vDEFbase)) {
322 $pObj->setArrayValueByPath($path .
'.vDEFbase', $this->
cleanFlexFormXML, $vDEFbase);
341 if (!is_array($pathArray)) {
342 $pathArray = explode(
'/', $pathArray);
344 if (is_array($array)) {
345 if (count($pathArray)) {
346 $key = array_shift($pathArray);
347 if (isset($array[$key])) {
348 if (!count($pathArray)) {
371 if (!is_array($pathArray)) {
372 $pathArray = explode(
'/', $pathArray);
374 if (is_array($array)) {
375 if (count($pathArray)) {
376 $key = array_shift($pathArray);
377 if (!count($pathArray)) {
378 $array[$key] = $value;
381 if (!isset($array[$key])) {
382 $array[$key] = array();
400 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'flexformForceCDATA']) {
401 $this->flexArray2Xml_options[
'useCDATA'] = 1;
403 $options =
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'niceFlexFormXMLtags'] ? $this->flexArray2Xml_options : array();
404 $spaceInd =
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'compactFlexFormXML'] ? -1 : 4;
407 $output =
'<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . LF . $output;
static makeInstance($className)
static getFlexFormDS($conf, $row, $table, $fieldName='', $WSOL=TRUE, $newRecordPidValue=0)
static array2xml(array $array, $NSprefix='', $level=0, $docTag='phparray', $spaceInd=0, array $options=array(), array $stackData=array())
static resolveSheetDefInDS($dataStructArray, $sheet='sDEF')
static isLoaded($key, $exitOnError=FALSE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static xml2array($string, $NSprefix='', $reportDocTag=FALSE)
static deleteClause($table, $tableAlias='')
static xmlGetHeaderAttribs($xmlData)