Skip to content

Commit

Permalink
[Backport 11.5] Update Examples.rst (#691)
Browse files Browse the repository at this point in the history
Fixed spelling mistake, updated fieldInformation example code

---------

Co-authored-by: Dominik.L <36797134+dominiklippl@users.noreply.github.com>
Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 10, 2023
1 parent 598bedc commit 2d87bc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Documentation/ColumnsConfig/Type/Inline/Examples.rst
Expand Up @@ -165,19 +165,21 @@ type inline** - as it is a container.
{
public function render()
{
$fieldName = $this->data['fieldName'];
$result = $this->initializeResultArray();
// Add fieldInformation only for this field name
// this may be changed accoringly
// this may be changed accordingly
if ($fieldName !== 'my_new_field') {
return $result;
}
$text = $GLOBALS['LANG']->sL(
'LLL:EXT:my_example/Resources/Private/Language/'
. 'locallang_db.xlf:tt_content.fieldInformation.demo'
);
$result['html'] = $text;
);
return $result;
}
}
Expand All @@ -201,7 +203,7 @@ type inline** - as it is a container.
#. Add the fieldInformation to the container for containerRenderType inline

.. code-block:: php
:caption: EXT:my_extension/Configuration/TCA/Overrrides/tt_content.php
:caption: EXT:my_extension/Configuration/TCA/Overrides/tt_content.php
$GLOBALS['TCA']['tt_content']['ctrl']['container']['inline']['fieldInformation'] = [
'demoFieldInformation' => [
Expand Down

0 comments on commit 2d87bc6

Please sign in to comment.