Issue Bug Closed

#85622itemsProcFunc in TCA -> select with foreign_table works not correctly

Julian Stelzer 07/23/18, 16:15 updated 09/09/20, 13:02

Description

If you use itemProcFunc in e.g. a category field in your TCA, you have no access to items anymore. You just can add new list items but you can’t hide items, which would be rendered or modify items.

'categories' => array(
            'exclude' => 0,
            'label' => 'Example',
            'config' => array(
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'foreign_table' => 'tx_example_domain_model_category',
                'MM' => 'tx_example_item_category_mm',
                'itemsProcFunc' => 'Vendor\\Example\\Utility\\TcaHelper->modifyCategorys',
                'size' => 10,
                'autoSizeMax' => 30,
                'minitems' => 1,
                'maxitems' => 9999,
                'multiple' => 0,
            ),
        ),

And some code stuff from the Custom Method

class TcaHelper {

    /**
     * @param $config
     * @param $pObj
     */
    public function modifyCategorys(array &$config, &$pObj) {

        \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(array(
            '$config' => $config,
            '$pObj' => $pObj,
        ), __CLASS__ . '@' . __LINE__);

...

$config[‘items’] is empty regardless of the items in the other table.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.