Actions
Task #53045
closedMake \TYPO3\CMS\Core\Category\CategoryRegistry::getCategoryFieldsForTable() reusable
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2013-10-22
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
hard
Sprint Focus:
Description
Currently the \TYPO3\CMS\Core\Category\CategoryRegistry::getCategoryFieldsForTable()
method throws an Exception if the menu_type of the current row is not set to 9
.
This is not very nice and not reusable.
It would be much better if you could simply configure the table name in the TCA that is calling the method so that it looks like that (TCA property name can be disussed):
'category_field' => array( 'label' => 'LLL:EXT:cms/locallang_ttc.xlf:category_field', 'config' => array( 'type' => 'select', 'size' => 1, 'minitems' => 0, 'maxitems' => 1, 'suppress_icons' => 1, 'itemsProcFunc' => 'TYPO3\\CMS\\Core\\Category\\CategoryRegistry->getCategoryFieldsForTable', 'relatedCategoryTable' => 'pages', ) )
Additionally we should think about removing the Exception because it will break the Backend for all Extensions / configurations that enhance the menu_type list with their own types and do not already have added the category fields (selected_categories
, category_field
) to the subtypes_excludelist
configuration.
Actions