.. include:: /Includes.rst.txt .. _usingMappers: ============= Using mappers ============= **Audience:** Integrators, Developers A form value can be mapped to a TypoScript constant, a site configuration property or a field from the configuration table from this extension. The mapping is defined in a php file located under `Configuration/TCA/Overrides` and assisted by helper functions from the extension `TcaUtility` class. Basic TCA-file structure ======================== .. code-block:: php TcaUtility::getPalette( 'company, domain', 'owner' ), ]; /** * Modify columns */ TcaUtility::modifyColumns( $tca['columns'], 'showAllProperties', [ 'onChange' => 'reload', 'config' => ['type' => 'check', 'renderType' => 'checkboxToggle'], ], 'easyconf' ); TcaUtility::modifyColumns( $tca['columns'], 'firstName, lastName', ['displayCond' => 'FIELD:easyconf_show_all_properties:REQ:true'], 'owner' ); /** * Define type (tabs from the form with palettes and fields) */ $tabs = [ 'tabTypoScript' => implode(', ', [ '--palette--;;paletteCompany', TcaUtility::getFieldList('firstName, lastName', 'owner'), ]), 'tabSiteConfiguration' => TcaUtility::getFieldList('company, contact, email, phone', 'agency'), 'tabEasyconf' => TcaUtility::getFieldList('showAllProperties', 'easyconf'), ]; $tca['types'][0] = TcaUtility::getType($tabs, $l10nFile); unset($tca); })();