From cc0429e63efe2d375295315bf51a3ba80e6a07b3 Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Sat, 3 Aug 2024 18:06:27 +0200 Subject: [PATCH] [TASK] Merge properties to selectsingle (#1139) Releases: main, 12.4 (cherry picked from commit 81737cb15ed5ab53dd93909d91e789438b73d357) --- .../CommonProperties/FieldWizard/Index.rst | 1 - .../FieldWizard/SelectIcons.rst | 14 --- .../ColumnsConfig/CommonProperties/Mm.rst | 3 +- .../Select/Properties/CheckBoxAppearance.rst | 1 - .../Type/Select/Properties/ItemGroups.rst | 11 +- .../Type/Select/Properties/Items.rst | 34 ----- .../Type/Select/Properties/Mm.rst | 13 -- .../Type/Select/Single/Examples.rst | 34 ----- .../Type/Select/Single/Index.rst | 117 ++++++++++++++++-- .../Type/Select/Single/Properties.rst | 72 ----------- .../_Properties/_AllowNonIdValues.rst.txt | 17 +++ .../Single/_Properties/_AuthMode.rst.txt | 34 +++++ .../_Properties/_AuthModeEnforce.rst.txt | 17 +++ .../Single/_Properties/_AutoSizeMax.rst.txt | 17 +++ .../Single/_Properties/_Behaviour.rst.txt | 23 ++++ .../Single/_Properties/_Default.rst.txt | 11 ++ .../_DisableNonMatchingValueElement.rst.txt | 12 ++ .../Single/_Properties/_FieldControl.rst.txt | 4 + .../_Properties/_FieldInformation.rst.txt | 4 + .../Single/_Properties/_FieldWizard.rst.txt | 33 +++++ .../_Properties/_FileFolderConfig.rst.txt | 71 +++++++++++ .../Single/_Properties/_ForeignTable.rst.txt | 34 +++++ .../_Properties/_ForeignTablePrefix.rst.txt | 16 +++ .../_Properties/_ForeignTableWhere.rst.txt | 68 ++++++++++ .../Single/_Properties/_ItemGroups.rst.txt | 35 ++++++ .../Select/Single/_Properties/_Items.rst.txt | 89 +++++++++++++ .../Single/_Properties/_ItemsProcFunc.rst.txt | 8 ++ .../Single/_Properties/_Maxitems.rst.txt | 8 ++ .../Single/_Properties/_Minitems.rst.txt | 8 ++ .../Select/Single/_Properties/_Mm.rst.txt | 117 ++++++++++++++++++ .../Single/_Properties/_Multiple.rst.txt | 14 +++ .../Single/_Properties/_ReadOnly.rst.txt | 11 ++ .../Select/Single/_Properties/_Size.rst.txt | 11 ++ .../_AllowLanguageSynchronization.php | 11 ++ 34 files changed, 793 insertions(+), 180 deletions(-) delete mode 100644 Documentation/ColumnsConfig/CommonProperties/FieldWizard/SelectIcons.rst delete mode 100644 Documentation/ColumnsConfig/Type/Select/Single/Examples.rst delete mode 100644 Documentation/ColumnsConfig/Type/Select/Single/Properties.rst create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AllowNonIdValues.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthMode.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthModeEnforce.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AutoSizeMax.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Behaviour.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Default.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_DisableNonMatchingValueElement.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldControl.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldInformation.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldWizard.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FileFolderConfig.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTable.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTablePrefix.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTableWhere.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemGroups.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Items.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemsProcFunc.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Maxitems.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Minitems.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Mm.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Multiple.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ReadOnly.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Size.rst.txt create mode 100644 Documentation/ColumnsConfig/Type/Select/Single/_Snippets/_AllowLanguageSynchronization.php diff --git a/Documentation/ColumnsConfig/CommonProperties/FieldWizard/Index.rst b/Documentation/ColumnsConfig/CommonProperties/FieldWizard/Index.rst index 32224091..e307c4b2 100644 --- a/Documentation/ColumnsConfig/CommonProperties/FieldWizard/Index.rst +++ b/Documentation/ColumnsConfig/CommonProperties/FieldWizard/Index.rst @@ -67,4 +67,3 @@ fieldWizard DefaultLanguageDifferences LocalizationStateSelector OtherLanguageContent - SelectIcons diff --git a/Documentation/ColumnsConfig/CommonProperties/FieldWizard/SelectIcons.rst b/Documentation/ColumnsConfig/CommonProperties/FieldWizard/SelectIcons.rst deleted file mode 100644 index a8978eaf..00000000 --- a/Documentation/ColumnsConfig/CommonProperties/FieldWizard/SelectIcons.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. include:: /Includes.rst.txt -.. _tca_property_fieldWizard_selectIcons: - -=========== -selectIcons -=========== - -.. confval:: selectIcons - :name: fieldWizard-selectIcons - :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard'] - :type: array - :Scope: fieldWizard - - Render thumbnails of icons below the select drop-down. Disabled by default. diff --git a/Documentation/ColumnsConfig/CommonProperties/Mm.rst b/Documentation/ColumnsConfig/CommonProperties/Mm.rst index 566c5748..fd182454 100644 --- a/Documentation/ColumnsConfig/CommonProperties/Mm.rst +++ b/Documentation/ColumnsConfig/CommonProperties/Mm.rst @@ -202,8 +202,7 @@ tablenames uid (auto-incremented and PRIMARY KEY) May be used if you need the "multiple" feature (which allows the same record to be references multiple times - in the box. See :ref:`MM_hasUidField ` for type='select' and - :ref:`MM_hasUidField ` for type='group' fields. + in the box. See :ref:`MM_hasUidField ` for type='group' fields. further fields May exist, in particular if :ref:`MM_match_fields ` / diff --git a/Documentation/ColumnsConfig/Type/Select/Properties/CheckBoxAppearance.rst b/Documentation/ColumnsConfig/Type/Select/Properties/CheckBoxAppearance.rst index 3f417151..a2faade2 100644 --- a/Documentation/ColumnsConfig/Type/Select/Properties/CheckBoxAppearance.rst +++ b/Documentation/ColumnsConfig/Type/Select/Properties/CheckBoxAppearance.rst @@ -10,7 +10,6 @@ appearance - selectCheckBox :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] :type: array :Scope: Display - :RenderType: :ref:`selectCheckBox ` Options for refining the appearance of `selectCheckBox` fields. diff --git a/Documentation/ColumnsConfig/Type/Select/Properties/ItemGroups.rst b/Documentation/ColumnsConfig/Type/Select/Properties/ItemGroups.rst index 3431fce8..7c9aed15 100644 --- a/Documentation/ColumnsConfig/Type/Select/Properties/ItemGroups.rst +++ b/Documentation/ColumnsConfig/Type/Select/Properties/ItemGroups.rst @@ -30,8 +30,13 @@ itemGroups group name gets displayed. -API methods -=========== + +.. _columns-select-properties-item-groups-api: + +Item group API methods +====================== + +.. _columns-select-properties-item-groups-api-custom: Adding custom select item groups -------------------------------- @@ -59,6 +64,8 @@ original TCA definition without using the API method. Use the API within :file:`TCA/Configuration/Overrides/` files to extend an existing TCA select field with grouping. +.. _columns-select-properties-item-groups-api-attach: + Attaching select items to item groups ------------------------------------- diff --git a/Documentation/ColumnsConfig/Type/Select/Properties/Items.rst b/Documentation/ColumnsConfig/Type/Select/Properties/Items.rst index 3b454ff3..def9f8b6 100644 --- a/Documentation/ColumnsConfig/Type/Select/Properties/Items.rst +++ b/Documentation/ColumnsConfig/Type/Select/Properties/Items.rst @@ -58,40 +58,6 @@ items Examples ======== -.. _tca_example_select_single_1: - -Simple items definition with label and value --------------------------------------------- - -.. include:: /Images/Rst/SelectSingle1.rst.txt - -.. include:: /CodeSnippets/SelectSingle1.rst.txt - - -.. _tca_example_select_single_4: - -Items definition with label, value and icon -------------------------------------------- - -A more complex example could be this (includes icons): - -.. include:: /Images/Rst/SelectSingle4.rst.txt - -.. include:: /CodeSnippets/SelectSingle4.rst.txt - -.. _tca_example_sys_language_uid: - -A typical sys_language_uid field --------------------------------- - -The icons can also be referenced by their identifier in the -:ref:`Icon API` - -.. include:: /Images/Rst/SysLanguageUid.rst.txt - -.. include:: /CodeSnippets/SysLanguageUid.rst.txt - - Select checkbox field with icons and descriptions ------------------------------------------------- diff --git a/Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst b/Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst index d342d4ec..fe6c31f5 100644 --- a/Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst +++ b/Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst @@ -33,19 +33,6 @@ MM in the :ref:`MM common property description `. -Examples -======== - -.. _tca_example_select_single_15: - -Select field with foreign table via MM table --------------------------------------------- - -.. include:: /Images/Rst/SelectSingle15.rst.txt - -.. include:: /CodeSnippets/SelectSingle15.rst.txt - - Related configurations ====================== diff --git a/Documentation/ColumnsConfig/Type/Select/Single/Examples.rst b/Documentation/ColumnsConfig/Type/Select/Single/Examples.rst deleted file mode 100644 index 149dcbd1..00000000 --- a/Documentation/ColumnsConfig/Type/Select/Single/Examples.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. include:: /Includes.rst.txt - -======== -Examples -======== - -.. _tca_example_select_single_3: - -Simple select drop down with static and database values -======================================================= - -.. include:: /Images/Rst/SelectSingle3.rst.txt - -.. include:: /CodeSnippets/SelectSingle3.rst.txt - - -.. _tca_example_select_single_12: - -Select foreign rows with icons -============================== - -.. include:: /Images/Rst/SelectSingle12.rst.txt - -.. include:: /CodeSnippets/SelectSingle12.rst.txt - - -.. _tca_example_select_single_10: - -Select a single value from a list of elements -============================================= - -.. include:: /Images/Rst/SelectSingle10.rst.txt - -.. include:: /CodeSnippets/SelectSingle10.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/Index.rst b/Documentation/ColumnsConfig/Type/Select/Single/Index.rst index 1ea78ea1..ce546f82 100644 --- a/Documentation/ColumnsConfig/Type/Select/Single/Index.rst +++ b/Documentation/ColumnsConfig/Type/Select/Single/Index.rst @@ -8,20 +8,123 @@ selectSingle Single select fields display a select field from which only one value can be chosen. -.. include:: /Images/Rst/SelectSingle12.rst.txt - The renderType selectSingle creates a drop-down box with items to select a -single value. Only if :ref:`size ` is set to a +single value. Only if :confval:`select-single-size` is set to a value greater than one, a box is rendered containing all selectable elements from which one can be chosen. +.. contents:: Table of contents + +.. _columns-select-rendertype-selectSingle-examples: + +Examples for select fields with renderType `selectSingle` +========================================================= + +.. _tca_example_select_single_3: + +Simple select drop down with static and database values +------------------------------------------------------- + +.. include:: /Images/Rst/SelectSingle3.rst.txt + +.. include:: /CodeSnippets/SelectSingle3.rst.txt + + +.. _tca_example_select_single_12: + +Select foreign rows with icons +------------------------------ + +.. include:: /Images/Rst/SelectSingle12.rst.txt + +.. include:: /CodeSnippets/SelectSingle12.rst.txt + + +.. _tca_example_select_single_10: + +Select a single value from a list of elements +--------------------------------------------- + .. include:: /Images/Rst/SelectSingle10.rst.txt -.. toctree:: - :titlesonly: +.. include:: /CodeSnippets/SelectSingle10.rst.txt + + +.. _columns-select-properties: + +Properties of the TCA column type `select` with renderType `selectSingle` +========================================================================= + +.. confval-menu:: + :display: table + :type: + :Scope: + + .. include:: _Properties/_AllowNonIdValues.rst.txt + :show-buttons: + + .. include:: _Properties/_AuthMode.rst.txt + :show-buttons: + + .. include:: _Properties/_AuthModeEnforce.rst.txt + :show-buttons: + + .. include:: _Properties/_AutoSizeMax.rst.txt + :show-buttons: + + .. include:: _Properties/_Behaviour.rst.txt + :show-buttons: + + .. include:: _Properties/_Default.rst.txt + :show-buttons: + + .. include:: _Properties/_DisableNonMatchingValueElement.rst.txt + :show-buttons: + + .. include:: _Properties/_FieldControl.rst.txt + :show-buttons: + + .. include:: _Properties/_FieldInformation.rst.txt + :show-buttons: + + .. include:: _Properties/_FieldWizard.rst.txt + :show-buttons: + + .. include:: _Properties/_FileFolderConfig.rst.txt + :show-buttons: + + .. include:: _Properties/_ForeignTable.rst.txt + :show-buttons: + + .. include:: _Properties/_ForeignTablePrefix.rst.txt + :show-buttons: + + .. include:: _Properties/_ForeignTableWhere.rst.txt + :show-buttons: + + .. include:: _Properties/_ItemGroups.rst.txt + :show-buttons: + + .. include:: _Properties/_Items.rst.txt + :show-buttons: + + .. include:: _Properties/_ItemsProcFunc.rst.txt + :show-buttons: + + .. include:: _Properties/_Maxitems.rst.txt + :show-buttons: + + .. include:: _Properties/_Minitems.rst.txt + :show-buttons: - Examples - Properties + .. include:: _Properties/_Mm.rst.txt + :show-buttons: + .. include:: _Properties/_Multiple.rst.txt + :show-buttons: + .. include:: _Properties/_ReadOnly.rst.txt + :show-buttons: + .. include:: _Properties/_Size.rst.txt + :show-buttons: diff --git a/Documentation/ColumnsConfig/Type/Select/Single/Properties.rst b/Documentation/ColumnsConfig/Type/Select/Single/Properties.rst deleted file mode 100644 index d0cdc3ba..00000000 --- a/Documentation/ColumnsConfig/Type/Select/Single/Properties.rst +++ /dev/null @@ -1,72 +0,0 @@ -.. include:: /Includes.rst.txt - -.. _columns-select-properties: -.. _columns-select-properties-type: -.. _columns-select-properties-behaviour: - -.. _columns-select-properties-dontremaptablesoncopy: -.. _columns-select-single-properties-fieldControl: -.. _columns-select-properties-fieldInformation: -.. _columns-select-properties-fieldWizard: - -.. _columns-select-properties-itemsprocfunc: -.. _columns-select-properties-localizereferencesatparentlocalization: -.. _columns-select-properties-minitems: - -.. _columns-select-properties-mm-hasuidfield: -.. _columns-select-properties-mm-opposite-field: -.. _columns-select-properties-mm-opposite-usage: -.. _columns-select-properties-mm-oppositeusage: - -.. _columns-select-properties-mm-table-where: -.. _columns-select-properties-multiple: -.. _columns-select-properties-readOnly: -.. _columns-select-properties-size: -.. _columns-select-properties-fieldControl: -.. _columns-select-properties-maxitems: - -========== -Properties -========== - -Select properties -================= - -* :ref:`allowNonIdValues ` -* :ref:`authmode ` -* :ref:`authmode > enforce ` -* :ref:`default ` -* :ref:`disableNoMatchingValueElement ` -* :ref:`fileFolderConfig ` - - * :ref:`folder ` - * :ref:`allowedExtensions ` - * :ref:`depth ` - -* :ref:`foreign_table ` -* :ref:`foreign_table_prefix ` -* :ref:`foreign_table_where ` -* :ref:`items ` -* :ref:`itemGroups ` -* :ref:`MM ` - -Common properties -================= - -* :ref:`behaviour > allowLanguageSynchronization ` -* :ref:`dontRemapTablesOnCopy ` -* :ref:`fieldControl ` -* :ref:`fieldInformation ` -* :ref:`fieldWizard ` with the following options - - * :ref:`defaultLanguageDifferences ` - * :ref:`localizationStateSelector ` - * :ref:`otherLanguageContent ` - * :ref:`selectIcons ` - -* :ref:`itemsProcFunc ` -* :ref:`localizeReferencesAtParentLocalization ` -* :ref:`minitems ` -* :ref:`multiple ` -* :ref:`readOnly ` -* :ref:`size ` diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AllowNonIdValues.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AllowNonIdValues.rst.txt new file mode 100644 index 00000000..5f6032df --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AllowNonIdValues.rst.txt @@ -0,0 +1,17 @@ +.. confval:: allowNonIdValues + :name: select-single-allowNonIdValues + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: boolean + :Scope: Proc. + :RenderType: all + + Only useful if :confval:`select-single-foreign-table` is enabled. + + If set, then values which are not integer ids will be allowed. May be needed + if you use itemsProcFunc or just enter additional items in the items array + to produce some string-value elements for the list. + + .. note:: + If you mix non-database relations with database relations like this, DO + NOT use integers for values and DO NOT use "\_" (underscore) in values + either! Will not work if you also use "MM" relations! diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthMode.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthMode.rst.txt new file mode 100644 index 00000000..3bf36f46 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthMode.rst.txt @@ -0,0 +1,34 @@ +.. _columns-select-single-properties-authmode: + +.. confval:: authMode + :name: select-single-authMode + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (keyword) + :Scope: Display / Proc. + :RenderType: all + + .. versionchanged:: 12.0 + The only valid value for TCA config option :php:`authMode` is now :php:`explicitAllow`. + The values :php:`explicitDeny` and :php:`individual` are obsolete and no longer evaluated. + + Authorization mode for the selector box. The only possible option is: + + explicitAllow + All static values from the "items" array of the selector box will be added to a matrix in the backend user + configuration where a value must be explicitly selected if a user (other than admin) is allowed to use it!) + +.. rubric:: Migration: Using authMode='explicitDeny' + +The "deny list" approach for single field values has been removed, the only allowed option +for :php:`authMode` is :php:`explicitAllow`. Extensions using config value :php:`explicitDeny` +should be adapted to switch to :php:`explicitAllow` instead. The upgrade wizard +"Migrate backend groups "explicit_allowdeny" field to simplified format." that transfers +existing :sql:`be_groups` rows to the new format, **drops** any :sql:`DENY` fields and instructs +admins to not set new access rights of affected backend groups. + +.. rubric:: Migration: Using authMode='individual' + +Handling of :php:`authMode` being set to :php:`individual` has been fully dropped. +The Core provides no alternative. This has been an obscure setting ever since and there is no +direct migration. Extensions that rely on this handling need to find a substitution based on +Core hooks, Core events or other existing Core API functionality. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthModeEnforce.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthModeEnforce.rst.txt new file mode 100644 index 00000000..cfaa908a --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AuthModeEnforce.rst.txt @@ -0,0 +1,17 @@ + +.. _columns-select-single-properties-authmode-enforce: + +.. versionchanged:: 12.0 + Handling of TCA config option :php:`authMode_enforce` has been removed. + +Migration: Using authMode_enforce='strict' + +Extensions with select fields using :php:`authMode` previously had different handling +if :php:`authMode_enforce => 'strict'` has been set: Let us say an editor accesses a record +with an :php:`authMode` field being set to a value it has no access to. With :php:`authMode_enforce` +**not** being set to :php:`strict`, the editor was still able to edit the record and set the value +to something it had access to. With :php:`authMode_enforce` being set to :php:`strict`, the editor +was not allowed to access the record. This has been streamlined: The backend interface no longer +renders those records for the editor and an "access denied" message is rendered instead. To +prevent this, a group this editor is member of needs to be adapted to allow access to this +particular value in the "Explicitly allow field values" (:sql:`explicit_allowdeny`) field. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AutoSizeMax.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AutoSizeMax.rst.txt new file mode 100644 index 00000000..941731e3 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_AutoSizeMax.rst.txt @@ -0,0 +1,17 @@ + +.. confval:: autoSizeMax + :name: select-single-autoSizeMax + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer + :Scope: Display + + The maximum size (height) of the select field. + + The size of the select field will be automatically adjusted based on + the number of selected items. The select field will never be smaller than + the specified :confval:`size ` and never larger than + the value of `autoSizeMax`. + + .. note:: + Only has an effect if :confval:`maxitems ` is + greater than 1. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Behaviour.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Behaviour.rst.txt new file mode 100644 index 00000000..5da7414b --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Behaviour.rst.txt @@ -0,0 +1,23 @@ +.. confval:: behaviour + :name: select-single-behaviour + + .. confval:: allowLanguageSynchronization + :type: boolean + :name: select-single-behaviour-allowLanguageSynchronization + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['behaviour']['allowLanguageSynchronization'] + :Scope: Proc. + :default: false + + Allows an editor to select in a localized record whether the value is copied + over from default or source language record, or if the field has an own value + in the localization. If set to true and if the table supports localization + and if a localized record is edited, this setting enables FieldWizard + :ref:`LocalizationStateSelector `: + Two or three radio buttons shown below the field input. The state of this is + stored in a json encoded array in the database table called :code:`l10n_state`. + It tells the DataHandler which fields of the localization records should be kept + in sync if the underlying default or source record changes. + + .. literalinclude:: _Snippets/_AllowLanguageSynchronization.php + :caption: EXT:my_extension/Configuration/TCA/Overrides/someTable.php + diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Default.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Default.rst.txt new file mode 100644 index 00000000..314f7917 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Default.rst.txt @@ -0,0 +1,11 @@ +.. _columns-select-single-properties-default: + +.. confval:: default + :name: select-single-default + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string + :Scope: Display / Proc. + :RenderType: all + + Default value set if a new record is created. If empty, the first element in + the items array is selected. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_DisableNonMatchingValueElement.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_DisableNonMatchingValueElement.rst.txt new file mode 100644 index 00000000..c58307f1 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_DisableNonMatchingValueElement.rst.txt @@ -0,0 +1,12 @@ +.. _columns-select-single-properties-disablenomatchingvalueelement: + +.. confval:: disableNoMatchingValueElement + :name: select-single-disableNoMatchingValueElement + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: boolean + :Scope: Display + :RenderType: all + + If set, then no element is inserted if the current value does not match + any of the existing elements. A corresponding options is also found in Page + TSconfig. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldControl.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldControl.rst.txt new file mode 100644 index 00000000..496d2857 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldControl.rst.txt @@ -0,0 +1,4 @@ +.. confval:: fieldControl + :name: select-single-fieldControl + + For details see :confval:`fieldControl`. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldInformation.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldInformation.rst.txt new file mode 100644 index 00000000..a11ab371 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldInformation.rst.txt @@ -0,0 +1,4 @@ +.. confval:: fieldInformation + :name: select-single-fieldInformation + + For details see :confval:`fieldInformation`. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldWizard.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldWizard.rst.txt new file mode 100644 index 00000000..4ed54006 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FieldWizard.rst.txt @@ -0,0 +1,33 @@ +.. confval:: fieldWizard + :name: select-single-fieldWizard + + .. confval:: defaultLanguageDifferences + :name: select-single-fieldWizard-defaultLanguageDifferences + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences'] + :type: array + + For details see :confval:`fieldWizard-defaultLanguageDifferences`. + + .. confval:: localizationStateSelector + :name: select-single-fieldWizard-localizationStateSelector + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector'] + :type: array + + For details see :confval:`fieldWizard-localizationStateSelector`. + + .. confval:: otherLanguageContent + :name: select-single-fieldWizard-otherLanguageContent + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent'] + :type: array + + For details see :confval:`fieldWizard-otherLanguageContent`. + + .. _tca_property_fieldWizard_selectIcons: + + .. confval:: selectIcons + :name: fieldWizard-selectIcons + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['selectIcons'] + :type: array + :Scope: fieldWizard + + Render thumbnails of icons below the select drop-down. Disabled by default. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FileFolderConfig.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FileFolderConfig.rst.txt new file mode 100644 index 00000000..2087982f --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_FileFolderConfig.rst.txt @@ -0,0 +1,71 @@ +.. _columns-select-single-properties-filefolder: +.. _columns-select-single-properties-fileFolderConfig: +.. _columns-select-single-properties-fileFolderConfig.folder: + +.. confval:: fileFolderConfig + :name: select-single-fileFolderConfig + + .. _columns-select-single-properties-filefolder-extlist: + .. _columns-select-single-properties-fileFolderConfig-allowedExtensions: + + .. confval:: allowedExtensions + :name: select-single-fileFolderConfig-allowedExtensions + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fileFolderConfig']['allowedExtensions'] + :type: string + :Scope: Display / Proc. + + List of file extensions to select. If blank, all files are selected. + Specify list in lowercase. + + This configuration can be overridden by :ref:`Page + TSconfig`. + + .. _columns-select-single-properties-filefolder-recursions: + .. _columns-select-single-properties-fileFolderConfig-depth: + + .. confval:: depth + :name: select-single-fileFolderConfig-depth + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fileFolderConfig']['depth'] + :type: integer + :Scope: Display / Proc. + :RenderType: all + + Depth of directory recursions. Default is 99. Specify in range from 0-99. 0 + (zero) means no recursion into subdirectories. Only useful in combination + with property :confval:`select-single-fileFolderConfig-folder`. + + This configuration can be overridden by :ref:`Page + TSconfig`. + + + .. confval:: folder + :name: select-single-fileFolderConfig-folder + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fileFolderConfig']['folder'] + :type: string + :Scope: Display / Proc. + + Specifying a folder from where files are added to the item array. + + Specify the folder relative to the + :php:`\TYPO3\CMS\Core\Core\Environment::getPublicPath()`. See :ref:`t3coreapi:Environment-public-path` . + Alternatively use the prefix "EXT:" to point to an extension folder. + + Files from the folder are selected recursively to the level specified by + :confval:`select-single-fileFolderConfig-depth` + and only files of the extensions defined by + :confval:`select-single-fileFolderConfig-allowedExtensions` + are listed in the select box. + + Only the file reference relative to the :confval:`select-single-fileFolderConfig-folder` is stored. + + If the files are images (gif,png,jpg) they will be configured as icons + (third parameter in items array). + + This configuration can be overridden by :ref:`Page + TSconfig`. + + .. rubric:: Examples: Select SVGs recursively from a folder + + .. include:: /Images/Rst/SelectSingle7.rst.txt + + .. include:: /CodeSnippets/SelectSingle7.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTable.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTable.rst.txt new file mode 100644 index 00000000..29f0bb06 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTable.rst.txt @@ -0,0 +1,34 @@ +.. _columns-select-single-properties-foreign-table: + +.. confval:: foreign_table + :name: select-single-foreign-table + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (table name) + :Scope: Proc. / Display + :RenderType: all + + The item-array will be filled with records from the table defined here. + The table must have a TCA definition. + + The uids of the chosen records will be saved in a comma separated list + by default. + + Use `property MM ` to store the values in an + intermediate MM table instead. + + .. deprecated:: 11.2 + Usage of the `foreign_table` relation with the table `sys_language` + Has been deprecated. Use TCA field type called + :ref:`language` instead. + +.. rubric:: Example: Select singe field with enabled selectIcons + +.. include:: /Images/Rst/SelectSingle12.rst.txt + +.. include:: /CodeSnippets/SelectSingle12.rst.txt + +.. rubric:: Example: Select field with foreign table via MM table + +.. include:: /Images/Rst/SelectSingle15.rst.txt + +.. include:: /CodeSnippets/SelectSingle15.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTablePrefix.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTablePrefix.rst.txt new file mode 100644 index 00000000..ba20bbd0 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTablePrefix.rst.txt @@ -0,0 +1,16 @@ +.. _columns-select-single-properties-foreign-table-prefix: + +.. confval:: foreign_table_prefix + :name: select-single-foreign-table-prefix + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string or LLL reference + :Scope: Display + :RenderType: all + + Label prefix to the title of the records from the foreign-table. + +.. rubric:: Example: Select single field with foreign_prefix and foreign_where + +.. include:: /Images/Rst/SelectSingle3.rst.txt + +.. include:: /CodeSnippets/SelectSingle3.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTableWhere.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTableWhere.rst.txt new file mode 100644 index 00000000..64fbd087 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ForeignTableWhere.rst.txt @@ -0,0 +1,68 @@ +.. _columns-select-single-properties-foreign-table-where: + +.. confval:: foreign_table_where + :name: select-single-foreign-table-where + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (SQL WHERE) + :Scope: Proc. / Display + :RenderType: all + + The items from :confval:`select-single-foreign-table` + are selected with this :sql:`WHERE` clause. The :sql:`WHERE` clause is effectively + appended to the existing :sql:`WHERE` clause (which contains default constraints, + such as :sql:`NOT deleted`) and must begin with :sql:`AND`. + +.. rubric:: Field quoting + +The example below uses the special field quoting syntax :php:`{#...}` around +identifiers to be as :ref:`DBAL `-compatible as possible. +Note that :php:`ORDER BY` and :php:`GROUP BY` +should NOT be quoted, since they always receive proper quoting automatically +through the API. + +Markers inside the WHERE statement + +It is possible to use markers in the WHERE clause: + +###REC\_FIELD\_[*field name*]### + Any field of the current record. + + .. note:: + The field name part of the marker is not in upper case letters. + It must match the exact case used in the database. + + So for example :sql:`sys_language_uid` must be referenced using + `###REC_FIELD_sys_language_uid###` + +###THIS\_UID### + Current element uid (zero if new). + +###CURRENT\_PID### + The current page id (pid of the record). + +###SITEROOT### + +:ref:`###PAGE\_TSCONFIG\_ID### ` + A value you can set from Page TSconfig dynamically. + +:ref:`###PAGE\_TSCONFIG\_IDLIST### ` + A value you can set from Page TSconfig dynamically. + +:ref:`###PAGE\_TSCONFIG\_STR### ` + A value you can set from Page TSconfig dynamically. + +###SITE:.### + A value from the site configuration, for example: `###SITE:mySetting.categoryPid###` or `###SITE:rootPageId###`. + +The markers are preprocessed so that the value of CURRENT\_PID and PAGE\_TSCONFIG\_ID are always integers +(default is zero), PAGE\_TSCONFIG\_IDLIST will always be a comma-separated list of integers (default is zero) +and PAGE\_TSCONFIG\_STR will be quoted before substitution (default is blank string). + +More information about markers set by Page TSconfig can be found in +the :ref:`TSconfig reference `. + +.. rubric:: Example: Select single field with foreign_prefix and foreign_where + +.. include:: /Images/Rst/SelectSingle3.rst.txt + +.. include:: /CodeSnippets/SelectSingle3.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemGroups.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemGroups.rst.txt new file mode 100644 index 00000000..40420459 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemGroups.rst.txt @@ -0,0 +1,35 @@ +.. _columns-select-single-properties-item-groups: + +.. confval:: itemGroups + :name: select-single-itemGroups + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Display / Proc. + :RenderType: all + + Contains an array of key-value pairs. The key contains the id of the item + group, the value contains the label of the item group or its language + reference. + + Only groups containing items will be displayed. In the select field first all + items with no group defined are listed then the item groups in the order of + their definition, each group with the corresponding items. + + Item groups are rendered as :html:``. + + Item groups can also be defined for items in + :confval:`foreign tables `. + + See also :ref:`columns-select-properties-item-groups-api` + +.. rubric:: Example: SelectSingle field with itemGroups + +.. include:: /Images/Rst/SelectSingle16.rst.txt + +.. include:: /CodeSnippets/SelectSingle16.rst.txt + +.. rubric:: Example: SelectSingle field with itemGroups, size=6 + +.. include:: /Images/Rst/SelectSingle17.rst.txt + +.. include:: /CodeSnippets/SelectSingle17.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Items.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Items.rst.txt new file mode 100644 index 00000000..f6a57ca7 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Items.rst.txt @@ -0,0 +1,89 @@ +.. _columns-select-single-properties-items: + +.. confval:: items + :name: select-single-items + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Display / Proc. + :RenderType: all + + Contains the elements for the selector box unless the property + :php:`foreign_table` or :php:`special` has been set in which case + automated values are set in addition to any values listed in this array. + + .. versionchanged:: 13.0 + Auto-registration of New content element wizard via TCA introduced. + If your extension supports both TYPO3 v12 and v13, keep the page TSconfig + option :confval:`newContentElement.wizardItems ` + until dropping TYPO3 v12 support. + + Items registered for the field :sql:`CType` of table :sql:`tt_content` get + automatically added to the :guilabel:`New content element` wizard. Settings + from the items property can be overridden via page TSconfig + :confval:`newContentElement.wizardItems `. + + See also :ref:`Add content elements to the Content Element Wizard `. + + .. deprecated:: 12.3 + + Using the numerical indexes 0 - 4 is deprecated. Use the newly introduced + keys. + + Each element in this array is in itself an associative array. + + label (string or LLL reference) + The displayed title. + + value (integer or string) + The value stored in the database. + + * The special value `--div--` was used to insert a non-selectable + value that appears as a divider label in the selector box. It is kept + for backwards-compatible reasons. Use :ref:`item groups + ` for custom selects instead. + * Values must not contain `,` (comma) and `|` (vertical bar). If you want to use :php:`authMode`, you should + also refrain from using `:` (colon). + + icon (EXT: path or icon identifier) + Optional icon. For custom icons use a path prepended with `EXT:` to refer to an image + file found inside an extension or use an registered icon identifier. If configured on the :php:`foreign_table`, + :ref:`selicon-field` is respected. + + group (string) + The key of the :ref:`item group `. + + description (string or array) + Fifth value is an optional description text. This is only shown when the list is shown + with `renderType='selectCheckBox'`. + + .. note:: + + When having a zero as :php:`value` and the field is of type :code:`int(10)` in the database, make sure to define + the :ref:`default value ` as well in TCA: :php:`'default' => 0`. Otherwise + issues may arise, e.g. with MySQL strict mode. + +.. _tca_example_select_single_1: + +.. rubric:: Example: Simple items definition with label and value + +.. include:: /Images/Rst/SelectSingle1.rst.txt + +.. include:: /CodeSnippets/SelectSingle1.rst.txt + +.. _tca_example_select_single_4: + +.. rubric:: Example: Items definition with label, value and icon + +A more complex example could be this (includes icons): + +.. include:: /Images/Rst/SelectSingle4.rst.txt + +.. include:: /CodeSnippets/SelectSingle4.rst.txt + +.. rubric:: Example: SelectSingle field with itemGroups + +A select single field of size 6 with 3 item groups and one item without group. + +.. include:: /Images/Rst/SelectSingle17.rst.txt + +.. include:: /CodeSnippets/SelectSingle17.rst.txt diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemsProcFunc.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemsProcFunc.rst.txt new file mode 100644 index 00000000..9dba67f5 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ItemsProcFunc.rst.txt @@ -0,0 +1,8 @@ +.. confval:: itemsProcFunc + :name: select-single-itemsProcFunc + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (class->method reference) + :Scope: Display / Proc. + + PHP method which is called to fill or manipulate the items array. + See :ref:`tca_property_itemsProcFunc` about details. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Maxitems.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Maxitems.rst.txt new file mode 100644 index 00000000..aee3f4fc --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Maxitems.rst.txt @@ -0,0 +1,8 @@ +.. confval:: maxitems + :name: select-single-maxitems + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer > 0 + :Scope: Display / Proc. + + Maximum number of child items. Defaults to a high value. JavaScript record + validation prevents the record from being saved if the limit is not satisfied. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Minitems.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Minitems.rst.txt new file mode 100644 index 00000000..a094a3f7 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Minitems.rst.txt @@ -0,0 +1,8 @@ +.. confval:: minitems + :name: select-single-minitems + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer > 0 + :Scope: Display + + Minimum number of child items. Defaults to 0. JavaScript record validation + prevents the record from being saved if the limit is not satisfied. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Mm.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Mm.rst.txt new file mode 100644 index 00000000..e0deb9d6 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Mm.rst.txt @@ -0,0 +1,117 @@ +.. _columns-select-single-properties-mm: + +.. versionadded:: 11.4 + TCA table column fields that define :php:`['config']['MM']` can omit the + specification of the intermediate MM table layout in + :ref:`ext_tables.sql `. The TYPO3 database + analyzer takes care of proper schema definition. + + Extensions are strongly encouraged to drop :sql:`CREATE TABLE` definitions + from the :file:`ext_tables.sql` file for those intermediate tables + referenced by TCA table columns. Dropping these definitions allows the Core + to adapt and migrate definitions if needed. + +.. confval:: MM + :name: select-single-mm + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (table name) + :Scope: Proc. + + This value contains the name of the table in which to store a MM relation. + It is used together with + :confval:`select-single-foreign-table`. + + The database field with a MM property only stores the number of records + in the relation. + + Please have a look into the additional information + in the :ref:`MM common property description `. + +.. _tca_example_select_single_15: + +.. rubric:: Example: Select field with foreign table via MM table + +.. include:: /Images/Rst/SelectSingle15.rst.txt + +.. include:: /CodeSnippets/SelectSingle15.rst.txt + +.. _columns-select-single-properties-mm-match-fields: + +.. confval:: MM_match_fields + :name: select-single-mm-match-fields + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Display / Proc. + + Array of field => value pairs to both insert and match against when + writing/reading MM relations. + + +.. confval:: MM_opposite_field + :name: select-single-mm-opposite-field + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (field name) + :Scope: Proc. + + If you want to make a MM relation editable from the foreign side + (bidirectional) of the relation as well, you need to set + :php:`MM_opposite_field` on the foreign side to the field name on + the local side. + + For example, if the field :sql:`companies.employees` is your local side and + you want to make the same relation editable from the foreign side of the + relation in a field called :sql:`persons.employers`, you would need to set + the :php:`MM_opposite_field` value of the TCA configuration of the + :sql:`persons.employers` field to the string "employees". + + .. note:: + Bidirectional references only get registered once on the native side in + :sql:`sys_refindex`. + + +.. confval:: MM_oppositeUsage + :name: select-single-mm-oppositeUsage + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: array + :Scope: Proc. + + In a MM bidirectional relation using + :confval:`match fields ` + the opposite side needs to know about the match fields for certain operations + (for example, when a copy is created in a + :doc:`workspace `) so that relations are carried over + with the correct information. + + :php:`MM_oppositeUsage` is an array which references which fields contain + the references to the opposite side, so that they can be queried for match + field configuration. + + +.. confval:: MM_table_where + :name: select-single-mm-table-where + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: string (SQL WHERE) + :Scope: Proc. + + Additional where clause used when reading MM relations. + + Example: + + .. code-block:: text + + {#uid_local} = ###THIS_UID### + + The above example uses the special field quoting syntax :php:`{#...}` + around identifiers to be as :ref:`DBAL `-compatible as + possible. + + +.. confval:: MM_hasUidField + :name: select-single-mm-hasUidField + + .. versionchanged:: 13.0 + This setting is obsolete. Remove all occurrences of :php:`MM_hasUidField` + from TCA. The :sql:`uid` column is added as primary key automatically, + if :php:`multiple = true` is set, otherwise a combined primary key of + fields :sql:`uid_local`, :sql:`uid_foreign` plus eventually + :sql:`tablenames` and :sql:`fieldname` is used. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Multiple.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Multiple.rst.txt new file mode 100644 index 00000000..1473da5b --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Multiple.rst.txt @@ -0,0 +1,14 @@ +.. confval:: multiple + :name: select-single-multiple + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: boolean + :Scope: Display / Proc. + + Allows the *same item* more than once in a list. + + If used with bidirectional MM relations it must be set for both the native + and foreign field configuration. + + .. versionchanged:: 13.0 + The property :confval:`select-single-mm-hasUidField` is + obsolete. It had to be defined previously when using `multiple`. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ReadOnly.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ReadOnly.rst.txt new file mode 100644 index 00000000..41c80634 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_ReadOnly.rst.txt @@ -0,0 +1,11 @@ +.. confval:: readOnly + :name: select-single-readOnly + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['readOnly'] + :type: boolean + :Scope: Display + + Renders the field in a way that the user can see the value but cannot edit it. + + .. warning:: + This property affects only the display. It is still possible to + write to those fields when using the :ref:`DataHandler `. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Size.rst.txt b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Size.rst.txt new file mode 100644 index 00000000..cbbf1c87 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Properties/_Size.rst.txt @@ -0,0 +1,11 @@ +.. _columns-select-single-properties-size: + +.. confval:: size + :name: select-single-size + :Path: $GLOBALS['TCA'][$table]['columns'][$field]['config'] + :type: integer + :Scope: Display + :Default: 1 + + If set to 1 (default), displays a select drop-down, else a + select box of given size. diff --git a/Documentation/ColumnsConfig/Type/Select/Single/_Snippets/_AllowLanguageSynchronization.php b/Documentation/ColumnsConfig/Type/Select/Single/_Snippets/_AllowLanguageSynchronization.php new file mode 100644 index 00000000..743ef6a0 --- /dev/null +++ b/Documentation/ColumnsConfig/Type/Select/Single/_Snippets/_AllowLanguageSynchronization.php @@ -0,0 +1,11 @@ + [ + 'type' => 'select', + 'renderType' => 'selectSingle', + 'behaviour' => [ + 'allowLanguageSynchronization' => true, + ], + ], +];