public function setInlineTca($json)
    {
        // Generate TCA for IRRE Fields and Tables
        $notIrreTables = array("pages", "tt_content", "sys_file_reference");
        if ($json) {
            foreach ($json as $table => $subJson) {
                $fieldTCA = array();
                if (array_search($table, $notIrreTables) === false) {
                    // Generate Table TCA
                    $this->generateTableTca($table, $subJson["tca"]);
                    // Generate Field TCA
                    $fieldTCA = $this->generateFieldsTca($subJson["tca"]);
                    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns($table, $fieldTCA);

                    // set label for inline
                    if (!empty($json["tt_content"]["tca"][$table]["inlineLabel"])) {
                        $fields = array_keys($subJson["tca"]);
                        if (array_search($json["tt_content"]["tca"][$table]["inlineLabel"], $fields) !== false) {
                            $GLOBALS["TCA"][$table]["ctrl"]['label'] = $json["tt_content"]["tca"][$table]["inlineLabel"];
                        }
                    }
                    // set icon for inline
                    if (!empty($json["tt_content"]["tca"][$table]["inlineIcon"])) {
                        $GLOBALS["TCA"][$table]["ctrl"]['iconfile'] = $json["tt_content"]["tca"][$table]["inlineIcon"];
                    } else {
                        $GLOBALS["TCA"][$table]["ctrl"]['iconfile'] = "EXT:mask/Resources/Public/Icons/Extension.svg";
                    }

                    // hide table in list view
                    $GLOBALS["TCA"][$table]['ctrl']['hideTable'] = true;
                }
            }
        }
    }
public function setInlineTca($json)
    {
        // Generate TCA for IRRE Fields and Tables
        $notIrreTables = array("pages", "tt_content", "sys_file_reference");
        if ($json) {
            foreach ($json as $table => $subJson) {
                $fieldTCA = array();
                if (array_search($table, $notIrreTables) === false) {
                    // Generate Table TCA
                    $this->generateTableTca($table, $subJson["tca"]);
                    // Generate Field TCA
                    $fieldTCA = $this->generateFieldsTca($subJson["tca"]);
                    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns($table, $fieldTCA);

                    // set label for inline
                    if (!empty($json["tt_content"]["tca"][$table]["inlineLabel"])) {
                        $fields = array_keys($subJson["tca"]);
                        if (array_search($json["tt_content"]["tca"][$table]["inlineLabel"], $fields) !== false) {
                            $GLOBALS["TCA"][$table]["ctrl"]['label'] = $json["tt_content"]["tca"][$table]["inlineLabel"];
                        }
                    }
                    // set icon for inline
                    if (!empty($json["tt_content"]["tca"][$table]["inlineIcon"])) {
                        $GLOBALS["TCA"][$table]["ctrl"]['iconfile'] = $json["tt_content"]["tca"][$table]["inlineIcon"];
                    } else {
                        $GLOBALS["TCA"][$table]["ctrl"]['iconfile'] = "EXT:mask/Resources/Public/Icons/Extension.svg";
                    }

                    // hide table in list view
                    $GLOBALS["TCA"][$table]['ctrl']['hideTable'] = true;
                }
            }
        }
    }
public function setInlineTca ( $ json ) { // Generate TCA for IRRE Fields and Tables $ notIrreTables = array ( "pages" , "tt_content" , "sys_file_reference" ) ; if ( $ json ) { foreach ( $ json as $ table => $ subJson ) { $ fieldTCA = array ( ) ; if ( array_search ( $ table , $ notIrreTables ) === false ) { // Generate Table TCA $ this -> generateTableTca ( $ table , $ subJson [ "tca" ] ) ; // Generate Field TCA $ fieldTCA = $ this -> generateFieldsTca ( $ subJson [ "tca" ] ) ; \ TYPO3 \ CMS \ Core \ Utility \ ExtensionManagementUtility :: addTCAcolumns ( $ table , $ fieldTCA ) ; // set label for inline if ( ! empty ( $ json [ "tt_content" ] [ "tca" ] [ $ table ] [ "inlineLabel" ] ) ) { $ fields = array_keys ( $ subJson [ "tca" ] ) ; if ( array_search ( $ json [ "tt_content" ] [ "tca" ] [ $ table ] [ "inlineLabel" ] , $ fields ) !== false ) { $ GLOBALS [ "TCA" ] [ $ table ] [ "ctrl" ] [ 'label' ] = $ json [ "tt_content" ] [ "tca" ] [ $ table ] [ "inlineLabel" ] ; } } // set icon for inline if ( ! empty ( $ json [ "tt_content" ] [ "tca" ] [ $ table ] [ "inlineIcon" ] ) ) { $ GLOBALS [ "TCA" ] [ $ table ] [ "ctrl" ] [ 'iconfile' ] = $ json [ "tt_content" ] [ "tca" ] [ $ table ] [ "inlineIcon" ] ; } else { $ GLOBALS [ "TCA" ] [ $ table ] [ "ctrl" ] [ 'iconfile' ] = "EXT:mask/Resources/Public/Icons/Extension.svg" ; } // hide table in list view $ GLOBALS [ "TCA" ] [ $ table ] [ 'ctrl' ] [ 'hideTable' ] = true ; } } } }
Generates and sets the correct tca for all the inline fields
@author Benjamin Butschell <bb@webprofil.at>
@param array $json
Generates and sets the correct tca for all the inline fields