Skip to content

Commit

Permalink
[TASK] Merge properties to selectsingle (#1139)
Browse files Browse the repository at this point in the history
Releases: main, 12.4

(cherry picked from commit 81737cb)
  • Loading branch information
linawolf committed Aug 3, 2024
1 parent a3e0c60 commit cc0429e
Show file tree
Hide file tree
Showing 34 changed files with 793 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ fieldWizard
DefaultLanguageDifferences
LocalizationStateSelector
OtherLanguageContent
SelectIcons

This file was deleted.

3 changes: 1 addition & 2 deletions Documentation/ColumnsConfig/CommonProperties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <columns-select-properties-mm-hasuidfield>` for type='select' and
:ref:`MM_hasUidField <columns-group-properties-mm-hasuidfield>` for type='group' fields.
in the box. See :ref:`MM_hasUidField <columns-group-properties-mm-hasuidfield>` for type='group' fields.

further fields
May exist, in particular if :ref:`MM_match_fields <columns-select-properties-mm-match-fields>` /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ appearance - selectCheckBox
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: array
:Scope: Display
:RenderType: :ref:`selectCheckBox <columns-select-rendertype-selectCheckBox>`

Options for refining the appearance of `selectCheckBox` fields.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------------------
Expand Down Expand Up @@ -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
-------------------------------------

Expand Down
34 changes: 0 additions & 34 deletions Documentation/ColumnsConfig/Type/Select/Properties/Items.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<t3coreapi:icon>`

.. include:: /Images/Rst/SysLanguageUid.rst.txt

.. include:: /CodeSnippets/SysLanguageUid.rst.txt


Select checkbox field with icons and descriptions
-------------------------------------------------

Expand Down
13 changes: 0 additions & 13 deletions Documentation/ColumnsConfig/Type/Select/Properties/Mm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@ MM
in the :ref:`MM common property description <tca_property_MM>`.


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
======================

Expand Down
34 changes: 0 additions & 34 deletions Documentation/ColumnsConfig/Type/Select/Single/Examples.rst

This file was deleted.

117 changes: 110 additions & 7 deletions Documentation/ColumnsConfig/Type/Select/Single/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <columns-select-properties-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:
72 changes: 0 additions & 72 deletions Documentation/ColumnsConfig/Type/Select/Single/Properties.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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!
Loading

0 comments on commit cc0429e

Please sign in to comment.