Skip to content

Commit

Permalink
[TASK] Overhaul columns (#990)
Browse files Browse the repository at this point in the history
* [TASK] Overhaul columns

* Correct indentation,
* add names for confvals

releases: main, 12.4, 11.5

* Update Documentation/Columns/Index.rst

* Update Documentation/Columns/Properties/DisplayCond.rst

---------

Co-authored-by: Chris Müller <[email protected]>
  • Loading branch information
linawolf and brotkrueml authored Mar 26, 2024
1 parent 12e7b2d commit 53ae429
Show file tree
Hide file tree
Showing 11 changed files with 301 additions and 295 deletions.
20 changes: 10 additions & 10 deletions Documentation/Columns/Examples.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. include:: /Includes.rst.txt
.. include:: /Includes.rst.txt

========
Examples
Expand All @@ -12,31 +12,31 @@ with slider, a select drop-down for images, an inline relation spanning multiple
The following examples all can be found in the
:ref:`extension styleguide <styleguide>`.

.. index::
Styleguide; select_single_12
pair: selectSingle; Images
.. index::
Styleguide; select_single_12
pair: selectSingle; Images

Select drop-down for records represented by images
==================================================

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

Select field with foreign table relation and field wizard:

.. include:: /CodeSnippets/SelectSingle12.rst.txt
.. include:: /CodeSnippets/SelectSingle12.rst.txt

The table :sql:`tx_styleguide_elements_select_single_12_foreign` is defined as
follows:

.. include:: /CodeSnippets/Manual/SelectSingle12ForeignPart.rst.txt
.. include:: /CodeSnippets/Manual/SelectSingle12ForeignPart.rst.txt

.. _tca_example_inline_1n1n_inline_1:
.. _tca_example_inline_1n1n_inline_1:

Inline relation (IRRE) spanning multiple tables
===============================================

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

Inline relation to a foreign table:

.. include:: /CodeSnippets/Inline1n1nInline1.rst.txt
.. include:: /CodeSnippets/Inline1n1nInline1.rst.txt
20 changes: 10 additions & 10 deletions Documentation/Columns/Index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. include:: /Includes.rst.txt
.. _columns:
.. include:: /Includes.rst.txt
.. _columns:

===========================
Field definitions (columns)
Expand All @@ -16,28 +16,28 @@ database relation selector box. Each type allows a set of additional "renderType

The basic structure looks like this:

.. code-block:: php
.. code-block:: php
'columns' => [
'aField' => [
'label' => 'someLabel',
'config' => [
'type' => 'aType',
'renderType' => 'aRenderType',
...
// ...
],
...
// ...
],
],
Properties on the level parallel to "label" are valid for all "type" and "renderType" combinations.
They are listed below. The list of properties within the "config" section depend on the specific "type" and "renderType"
combination and are explained in detail in the :ref:`['columns']['config'] <columns-types>` section.

.. _columns-properties:
.. _columns-properties:

.. toctree::
:titlesonly:
.. toctree::
:titlesonly:

Examples
Properties/Index
Examples
Properties/Index
26 changes: 13 additions & 13 deletions Documentation/Columns/Properties/Config.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
.. include:: /Includes.rst.txt
.. _columns-properties-config:
.. include:: /Includes.rst.txt
.. _columns-properties-config:

======
config
======

.. confval:: config
.. confval:: config
:name: columns-config
:Path: $GLOBALS['TCA'][$table]['columns'][$field]
:Required: true
:type: array
:Scope: Proc. / Display

:Path: $GLOBALS['TCA'][$table]['columns'][$field]
:Required: true
:type: array
:Scope: Proc. / Display
Contains the main configuration properties of the fields display and processing behavior.

Contains the main configuration properties of the fields display and processing behavior.

The possibilities for this array depend on the value of the array keys "type" and "renderType" within the array,
see :ref:`the dedicated section <columns-types>` for details.
The possibilities for this array depend on the value of the array keys "type" and "renderType" within the array,
see :ref:`the dedicated section <columns-types>` for details.

Examples
========

Simple input field
------------------

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

.. include:: /CodeSnippets/Input1.rst.txt
.. include:: /CodeSnippets/Input1.rst.txt
28 changes: 14 additions & 14 deletions Documentation/Columns/Properties/Description.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
.. include:: /Includes.rst.txt
.. _columns-properties-description:
.. include:: /Includes.rst.txt
.. _columns-properties-description:

===========
Description
===========

.. confval:: description
.. confval:: description
:name: columns-description
:Path: $GLOBALS['TCA'][$table]['columns'][$field]
:Required: false
:type: string or LLL reference
:Scope: Display

:Path: $GLOBALS['TCA'][$table]['columns'][$field]
:Required: false
:type: string or LLL reference
:Scope: Display
The property can be used to display an additional help text between the field label and
the user input when editing records. As an example, the Core uses the description property
in the site configuration module when editing a site on some properties like `identifier`.

The property can be used to display an additional help text between the field label and
the user input when editing records. As an example, the Core uses the description property
in the site configuration module when editing a site on some properties like `identifier`.

The property is available on all common `TCA` types like `input` and `select` and so on.
The property is available on all common `TCA` types like `input` and `select` and so on.

Example
=======

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


The field can be used with a string that will be directly output or with a
language reference:

.. include:: /CodeSnippets/Input1.rst.txt
.. include:: /CodeSnippets/Input1.rst.txt

You can find this example in the :ref:`extension styleguide <styleguide>`.
Loading

0 comments on commit 53ae429

Please sign in to comment.