Project

General

Profile

Actions

Task #53045

closed

Make \TYPO3\CMS\Core\Category\CategoryRegistry::getCategoryFieldsForTable() reusable

Added by Alexander Stehlik over 10 years ago. Updated about 5 years ago.

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 #1

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #3

Updated by Gerrit Code Review about 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #4

Updated by Gerrit Code Review almost 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #6

Updated by Gerrit Code Review almost 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #7

Updated by Gerrit Code Review over 9 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #8

Updated by Gerrit Code Review almost 9 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #9

Updated by Gerrit Code Review almost 9 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #10

Updated by Gerrit Code Review almost 9 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #11

Updated by Gerrit Code Review over 8 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #12

Updated by Gerrit Code Review over 8 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/24968

Actions #13

Updated by Gerrit Code Review over 8 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #14

Updated by Gerrit Code Review over 8 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #15

Updated by Gerrit Code Review about 8 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #16

Updated by Gerrit Code Review over 7 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #17

Updated by Gerrit Code Review over 7 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #18

Updated by Gerrit Code Review over 7 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/24968

Actions #19

Updated by Anja Leichsenring over 7 years ago

  • Description updated (diff)
  • Sprint Focus set to On Location Sprint
Actions #20

Updated by Alexander Stehlik over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #21

Updated by Christian Kuhn over 7 years ago

  • Status changed from Resolved to New
Actions #22

Updated by Christian Kuhn over 7 years ago

  • Complexity changed from medium to hard
Actions #23

Updated by Marc Bastian Heinrichs about 7 years ago

Run into this lately and also thought about a flexible solution. A really hard one.

Actions #24

Updated by Anja Leichsenring over 6 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #25

Updated by Susanne Moog about 5 years ago

  • Status changed from New to Needs Feedback

Can someone add some more info: What shall be achieved? What problem will be solved? How can the problem be reproduced?

Actions #26

Updated by Alexander Stehlik about 5 years ago

The problem is pretty much solved I guess in current TYPO3 versions, at least at a record type level basis.

In the old days, when the menu types were not separate content elements there was no mechanism to add your own category based menu types. The menu types and their associated tables were (and still are as a fallback) hardcoded in the CategoryRegistry->getCategoryFieldsForTable() method.

The goal of my patch back then was to create a mechanism that allowed a flexible detection of the categorized table.

Today there already exists a mechanism with the table parameter for the itemsProcConfig and the columnsOverrides mechanism in the types config of the TCA.

It is still not possible to change the related category table based on subtypes but I think that is an edge case and can be ignored.

From my perspective this issue is solved.

Actions #27

Updated by Riccardo De Contardi about 5 years ago

  • Status changed from Needs Feedback to Closed

@Alexander Stehlik I must thank you for your feedback; I close this issue for now.

If you think that this is the wrong decision or that there is still work to be done on this topic, please reopen it or open a new issue with a reference to this one (or ping me and I'll reopen it)

Thank you.

Actions

Also available in: Atom PDF