Skip to content
Snippets Groups Projects
Commit 35cbd701 authored by Markus Sommer's avatar Markus Sommer Committed by Markus Klein
Browse files

[FEATURE] Add translation params for category

Add l10n_mode and l10n_display to TCA Config for category view.

Resolves: #66681
Releases: master, 6.2
Change-Id: I3f895c0578b8506179493f077f94ff0270b78167
Reviewed-on: http://review.typo3.org/39154


Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 2097fc3b
Branches
Tags
No related merge requests found
......@@ -311,6 +311,8 @@ class CategoryRegistry implements SingletonInterface {
* + fieldConfiguration: TCA field config array to override defaults
* + label: backend label of the categories field
* + interface: boolean if the category should be included in the "interface" section of the TCA table
* + l10n_mode
* + l10n_display
* @return void
*/
protected function addTcaColumn($tableName, $fieldName, array $options) {
......@@ -338,6 +340,13 @@ class CategoryRegistry implements SingletonInterface {
),
);
if (isset($options['l10n_mode'])) {
$columns[$fieldName]['l10n_mode'] = $options['l10n_mode'];
}
if (isset($options['l10n_display'])) {
$columns[$fieldName]['l10n_display'] = $options['l10n_display'];
}
// Register opposite references for the foreign side of a relation
if (empty($GLOBALS['TCA']['sys_category']['columns']['items']['config']['MM_oppositeUsage'][$tableName])) {
$GLOBALS['TCA']['sys_category']['columns']['items']['config']['MM_oppositeUsage'][$tableName] = array();
......
=================================================================================
Feature: #66681 - CategoryRegistry: add options to set l10n_mode and l10n_display
=================================================================================
Description
===========
Class *CategoryRegistry->addTcaColumn* got options to set *l10n_mode* and *l10n_display*.
The values can be set via:
.. code-block:: php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
$extensionKey,
$tableName,
'categories',
array(
'l10n_mode' => 'string (keyword)',
'l10n_display' => 'list of keywords'
)
);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment