Skip to content

Commit

Permalink
[TASK] Merge properties to text - table page
Browse files Browse the repository at this point in the history
Releases: main, 12.4
  • Loading branch information
linawolf committed Aug 3, 2024
1 parent 6dec0ce commit b13d913
Show file tree
Hide file tree
Showing 21 changed files with 334 additions and 65 deletions.
7 changes: 0 additions & 7 deletions Documentation/ColumnsConfig/Type/Index.rst

This file was deleted.

14 changes: 0 additions & 14 deletions Documentation/ColumnsConfig/Type/Text/TextTable/Examples.rst

This file was deleted.

77 changes: 65 additions & 12 deletions Documentation/ColumnsConfig/Type/Text/TextTable/Index.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,80 @@
.. include:: /Includes.rst.txt
.. _columns-text-renderType-textTable:
.. _tca_property_fieldControl_tableWizard:

=========
textTable
=========

This page describes the :ref:`text <columns-text>` type with the :php:`renderType='textTable'`.

.. code-block:: php
// ...
'type' => 'text',
'renderType' => 'textTable',
// ...
This page describes the :ref:`text <columns-text>` type with the
:php:`renderType='textTable'`.

The textTable render type triggers a view called "table wizard" to
manage the frontend table display in the backend. It is used for the "Table"
tt_content content element.

.. contents:: Table of contents

.. _tca_example_text_17:

Example: Text field with renderType `textTable`
===============================================

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

.. toctree::
.. include:: /CodeSnippets/Text17.rst.txt

.. _columns-text-textTable-codeEditor-properties:

Properties of the TCA column type `text`, render type `textTable`
==================================================================

.. confval-menu::
:display: table
:type:
:Scope:

.. include:: _Properties/_AllowLanguageSynchronization.rst.txt
:show-buttons:

.. include:: _Properties/_Default.rst.txt
:show-buttons:

.. include:: _Properties/_EnableTabulator.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/_FixedFont.rst.txt
:show-buttons:

.. include:: _Properties/_IsIn.rst.txt
:show-buttons:

.. include:: _Properties/_Max.rst.txt
:show-buttons:

.. include:: _Properties/_Placeholder.rst.txt
:show-buttons:

.. include:: _Properties/_ReadOnly.rst.txt
:show-buttons:

.. include:: _Properties/_Rows.rst.txt
:show-buttons:

.. include:: _Properties/_Search.rst.txt
:show-buttons:

.. include:: _Properties/_Softref.rst.txt
:show-buttons:

.. include:: _Properties/_Wrap.rst.txt
:show-buttons:

Examples
Properties
32 changes: 0 additions & 32 deletions Documentation/ColumnsConfig/Type/Text/TextTable/Properties.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. confval:: behaviour
:name: text-table-behaviour

.. confval:: allowLanguageSynchronization
:type: boolean
:name: text-table-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 <columns-input-properties-fieldWizard-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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. confval:: default
:name: text-table-default
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['default']
:type: string
:Scope: Display / Proc.

Default value set if a new record is created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. confval:: enableTabulator
:name: text-table-enableTabulator
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Display
:RenderType: :ref:`default <columns-text-renderType-default>`, :ref:`textTable <columns-text-renderType-textTable>`

Enabling this allows to use tabs in a text field. This works well together with
:ref:`fixed-width fonts <columns-text-properties-fixedFont>` (monospace) for code editing.

Does not apply to RTE fields.

.. rubric:: Example: Fixed font field with tabulators enabled

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

.. include:: /CodeSnippets/Text15.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. confval:: fieldControl
:name: text-table-fieldControl

For details see :confval:`fieldControl`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. confval:: fieldInformation
:name: text-table-fieldInformation

For details see :confval:`fieldInformation`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. confval:: fieldWizard
:name: text-table-fieldWizard

.. confval:: defaultLanguageDifferences
:name: text-table-fieldWizard-defaultLanguageDifferences
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences']
:type: array

For details see :confval:`fieldWizard-defaultLanguageDifferences`.

.. confval:: localizationStateSelector
:name: text-table-fieldWizard-localizationStateSelector
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector']
:type: array

For details see :confval:`fieldWizard-localizationStateSelector`.

.. confval:: otherLanguageContent
:name: text-table-fieldWizard-otherLanguageContent
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent']
:type: array

For details see :confval:`fieldWizard-otherLanguageContent`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. confval:: fixedFont
:name: text-table-fixedFont
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: boolean
:Scope: Display
:RenderType: :ref:`default <columns-text-renderType-default>`, :ref:`textTable <columns-text-renderType-textTable>`

Enables a fixed-width font (monospace) for the text field. This is useful when using code.

Does not apply to RTE fields.

.. rubric:: Example: Fixed font field with tabulators enabled

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

.. include:: /CodeSnippets/Text15.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. confval:: is_in
:name: text-table-is-in
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: string
:Scope: Display / Proc.
:RenderType: :ref:`textTable <columns-text-renderType-textTable>`,
:ref:`default <columns-text-renderType-default>`

If a user-defined evaluation is used for the field (see :ref:`eval <columns-text-properties-eval>`),
then this value will be passed as argument to the user-defined evaluation function.

Does not apply to RTE fields.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. confval:: max
:name: text-table-max
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: integer
:Scope: Display
:RenderType: :ref:`textTable <columns-text-renderType-textTable>`,
:ref:`default <columns-text-renderType-default>`

Adds the HTML5 attribute "maxlength" to a textarea. Prevents the field from adding more than
specified number of characters. This is a client side restriction, no server side length restriction
is enforced.

Does not apply for RTE fields.

.. rubric:: Example: Textarea with a maximum of 30 characters

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

.. include:: /CodeSnippets/Text11.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. confval:: placeholder
:name: text-table-placeholder
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: string
:Scope: Display
:Types: :ref:`input <columns-input>`

Placeholder text for the field.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. confval:: readOnly
:name: text-table-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 <t3coreapi:tce>`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. confval:: rows
:name: text-table-rows
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: integer
:Scope: Display
:RenderType: :ref:`textTable <columns-text-renderType-textTable>`,
:ref:`codeEditor <columns-text-renderType-codeEditor>`,
:ref:`default <columns-text-renderType-default>`

The number of rows in the textarea. May be corrected for harmonization between browsers. Will also
automatically be increased if the content in the field is found to be of a certain length, thus the
field will automatically fit the content. Default is 5. Max value is 20.

Does not apply to RTE fields.

.. rubric:: Example: A simple text editor with 20 width

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

.. include:: /CodeSnippets/Text4.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.. confval:: search
:name: text-table-search
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['search']
:type: array
:Scope: Search
:Types: :ref:`input <columns-input>`

Defines additional search-related options for a given field.

.. confval:: pidonly
:name: text-table-search-pidonly
:type: boolean
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['pidonly']

Searches in the column only if search happens on the single page, does
not search the field if searching in the whole table.

.. confval:: case
:name: text-table-search-case
:type: boolean
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['case']

Makes the search case-sensitive. This requires a proper database
collation for the field, see your database documentation.

.. confval:: andWhere
:name: text-table-search-andWhere
:type: string
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['andWhere']

Additional SQL WHERE statement without 'AND'. With this it is possible
to place an additional condition on the field when it is searched

.. literalinclude:: _Snippets/_Search.php
:caption: EXT:my_extension/Configuration/TCA/Overrides/someTable.php

This means that the "my_editor" field of the "tx_mytable" table will
be searched in only for elements of type X and Y. This helps making any
search more relevant.

The above example uses the special field quoting syntax :php:`{#...}`
around identifiers to be as :ref:`DBAL <t3coreapi:database>` compatible as
possible.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. confval:: softref
:name: text-table-softref
:Path: $GLOBALS['TCA'][$table]['columns'][$field]['config']
:type: string
:Scope: Proc.
:Types: :ref:`input <columns-input>`

Used to attach "soft reference parsers".

The syntax for this value is key1,key2[parameter1;parameter2;...],...

See :ref:`Soft references of core API <t3coreapi:soft-references>` for
more details about softref keys.
Loading

0 comments on commit b13d913

Please sign in to comment.