Skip to content

Commit

Permalink
[Backport 12.4] Add snippet in ext_localconf.php for custom FieldInfo…
Browse files Browse the repository at this point in the history
…rmation (#892)

Co-authored-by: Sybille Peters <[email protected]>
  • Loading branch information
github-actions[bot] and sypets authored Dec 21, 2023
1 parent 8c09175 commit 3d122e4
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions Documentation/ColumnsConfig/CommonProperties/FieldInformation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fieldInformation
In contrast to "fieldWizard", HTML returned by fieldInformation is limited, see
:ref:`FormEngine docs <t3coreapi:FormEngine-Rendering-NodeExpansion>` for more details.

.. hint::
.. hint::

:php:`fieldInformation` is not implemented by default. Use :ref:`columns-properties-description`
to display general information below a fields title.
Expand Down Expand Up @@ -61,13 +61,13 @@ The implementation can be found in https://github.com/georgringer/news/blob/9.4.
.. code-block:: php
<?php
declare(strict_types=1);
namespace GeorgRinger\News\Backend\FieldInformation;
use TYPO3\CMS\Backend\Form\AbstractNode;
class StaticText extends AbstractNode
{
public function render(): array
Expand All @@ -82,3 +82,16 @@ The implementation can be found in https://github.com/georgringer/news/blob/9.4.
];
}
}
The custom FieldInformation must be rendered in :file:`ext_localconf.php`:

.. code-block:: php
:caption: EXT:news/ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1552726986] = [
'nodeName' => 'NewsStaticText',
'priority' => 70,
'class' => \GeorgRinger\News\Backend\FieldInformation\StaticText::class
];

0 comments on commit 3d122e4

Please sign in to comment.