#75834removeItems, backendLayouts, pageTSconfig
Description
Hello Core-Team,
in privious TYPO3 Versions you have following structure:
if (isset($config['itemsProcFunc']) && $config['itemsProcFunc']) {
$selItems = $this->procItems($selItems, $PA['fieldTSConfig']['itemsProcFunc.'], $config, $table, $row, $field);
}
// Possibly remove some items:
$removeItems = t3lib_div::trimExplode(',', $PA['fieldTSConfig']['removeItems'], 1);
Execute itemsProcFunc and THEN remove items by pageTSconfig
Now you have a structure like that:
$fieldConfig['config']['items'] = $this->removeItemsByKeepItemsPageTsConfig();
$fieldConfig['config']['items'] = $this->addItemsFromPageTsConfig();
$fieldConfig['config']['items'] = $this->removeItemsByRemoveItemsPageTsConfig();
...
$removedItems = array_diff_key($removedItems, $fieldConfig['config']['items']);
// Resolve "itemsProcFunc"
if (!empty($fieldConfig['config']['itemsProcFunc'])) {
$fieldConfig['config']['items'] = $this->resolveItemProcessorFunction();
}
Remove items defined by pageTSconfig and THEN execute itemsProcFunc.
So we can’t remove items, which are generated by userFuncs anymore.
Next step: backend_layouts:
To remove the “none” entry, which was defined by TCA, we have to use removeItems. To remove entries, generated by itemsProcFunc, we have to use options.backendLayout.exclude. Not really userFriendly. BUT: That entry will be removed in BOTH select fields. That’s not our goal. We only want to remove one entry from backend_layout and nothing more.
Maybe it would be a good start to differ them by adding a new option like:
options.backendLayoutNext.exclude
Stefan