/** * Convert the DOM object-id of an inline container to an array. * The object-id could look like 'data-parentPageId-tx_mmftest_company-1-employees'. * The result is written to $this->inlineStructure. * There are two keys: * - 'stable': Containing full qualified identifiers (table, uid and field) * - 'unstable': Containting partly filled data (e.g. only table and possibly field) * * @param string $domObjectId: The DOM object-id * @param boolean $loadConfig: Load the TCA configuration for that level (default: true) * @return void */ function parseStructureString($string, $loadConfig = true) { $unstable = array(); $vector = array('table', 'uid', 'field'); $pattern = '/^' . $this->prependNaming . self::Structure_Separator . '(.+?)' . self::Structure_Separator . '(.+)$/'; if (preg_match($pattern, $string, $match)) { $this->inlineFirstPid = $match[1]; $parts = explode(self::Structure_Separator, $match[2]); $partsCnt = count($parts); for ($i = 0; $i < $partsCnt; $i++) { if ($i > 0 && $i % 3 == 0) { // load the TCA configuration of the table field and store it in the stack if ($loadConfig) { t3lib_div::loadTCA($unstable['table']); $unstable['config'] = $GLOBALS['TCA'][$unstable['table']]['columns'][$unstable['field']]['config']; // Fetch TSconfig: $TSconfig = $this->fObj->setTSconfig($unstable['table'], array('uid' => $unstable['uid'], 'pid' => $this->inlineFirstPid), $unstable['field']); // Override TCA field config by TSconfig: if (!$TSconfig['disabled']) { $unstable['config'] = $this->fObj->overrideFieldConf($unstable['config'], $TSconfig); } $unstable['localizationMode'] = t3lib_BEfunc::getInlineLocalizationMode($unstable['table'], $unstable['config']); } $this->inlineStructure['stable'][] = $unstable; $unstable = array(); } $unstable[$vector[$i % 3]] = $parts[$i]; } $this->updateStructureNames(); if (count($unstable)) { $this->inlineStructure['unstable'] = $unstable; } } }