diff --git a/Build/Screenshots/create-records.php b/Build/Screenshots/create-records.php index 80da193e..f22afe3a 100644 --- a/Build/Screenshots/create-records.php +++ b/Build/Screenshots/create-records.php @@ -187,6 +187,8 @@ 'usergroup' => (string)$dataHandler->substNEWwithIDs['NEWeditors'], // The example of importing user TSconfig from a site package 'TSconfig' => "@import 'EXT:my_sitepackage/Configuration/TsConfig/User/my_editor.tsconfig'\n", + // The static user TSconfig file of my_extension + 'tsconfig_includes' => 'EXT:my_extension/Configuration/TsConfig/User/editor.tsconfig', ]]]); $testUser = $dataHandler->substNEWwithIDs['NEWtest']; $uids['testUser'] = $testUser; diff --git a/Build/Screenshots/screenshots.mjs b/Build/Screenshots/screenshots.mjs index acf4af49..2d97b899 100644 --- a/Build/Screenshots/screenshots.mjs +++ b/Build/Screenshots/screenshots.mjs @@ -460,6 +460,7 @@ const screenshots = { url: editUrl('be_users', testUser), tab: 'Options', element: field('TSconfig'), + to: field('tsconfig_includes'), }, 'Configuration/UserTSconfigOverview': { // Short, the tree of the administrator is long diff --git a/Documentation/CodeSnippets/my_extension/Configuration/TCA/Overrides/be_users.php b/Documentation/CodeSnippets/my_extension/Configuration/TCA/Overrides/be_users.php new file mode 100644 index 00000000..57eccd1d --- /dev/null +++ b/Documentation/CodeSnippets/my_extension/Configuration/TCA/Overrides/be_users.php @@ -0,0 +1,15 @@ + TSconfig`. .. figure:: /Images/GeneratedScreenshots/BackendUsers/TSconfigUserInput.png - :alt: The TSconfig field in the Options tab of a backend user + :alt: The field "TSconfig" with the line @import + 'EXT:my_sitepackage/Configuration/TsConfig/User/my_editor.tsconfig'. + Below it, the field "Include static TSconfig" with the selected + item "Editor (my_extension)" and the path of its file. :class: with-shadow - The :guilabel:`TSconfig` field in the :guilabel:`Options` tab of a backend user + The :guilabel:`TSconfig` and :guilabel:`Include static TSconfig` + fields in the :guilabel:`Options` tab of a backend user #. Enter the following TSconfig to import a configuration file from your sitepackage: @@ -50,6 +54,53 @@ group is loaded. The order in which the groups are added to the user in field The TSconfig from latter groups overrides the TSconfig from earlier groups if both define the same property. +.. index:: pair: User TSconfig; Include static +.. _include-static-user-tsconfig: + +Include static user TSconfig into a backend user or group +========================================================= + +.. versionadded:: 14.2 + :changelog: feature-78412-1719144405 + +User TSconfig files that an extension has +:ref:`registered ` can be selected in the +record of a backend user or group, just like static page TSconfig in the page +properties. The configuration stays in the file and is not stored in the +database. + +#. Open the record of the user or group. +#. Go to the tab :guilabel:`Options`, then to + :guilabel:`Include static TSconfig` and select the desired configurations + from the :guilabel:`Available Items`, see the + :ref:`figure above `. + +.. _register-static-user-tsconfig: + +Register static user TSconfig files +----------------------------------- + +Register user TSconfig files for backend users in the +:file:`Configuration/TCA/Overrides/be_users.php` of any extension: + +.. literalinclude:: _UserTSconfig/_be_users.php + :language: php + :caption: EXT:my_sitepackage/Configuration/TCA/Overrides/be_users.php + +Register them for backend user groups in +:file:`Configuration/TCA/Overrides/be_groups.php`: + +.. literalinclude:: _UserTSconfig/_be_groups.php + :language: php + :caption: EXT:my_sitepackage/Configuration/TCA/Overrides/be_groups.php + +The extension key is appended to the title in the selector, so the title +cannot be a +`label reference `_. + +Do not use a comma in the file path. TYPO3 removes every comma from it, +because a comma separates the selected files in the field. + .. index:: pair: User TSconfig; Default values .. _usersettingdefaultusertsconfig: diff --git a/Documentation/UsingSettingTSconfig/_UserTSconfig/_be_groups.php b/Documentation/UsingSettingTSconfig/_UserTSconfig/_be_groups.php new file mode 100644 index 00000000..d5191be7 --- /dev/null +++ b/Documentation/UsingSettingTSconfig/_UserTSconfig/_be_groups.php @@ -0,0 +1,11 @@ +