Feature: #94765 - Introduce showNewRecordLink option
See forge#94765
Description
Previously, it was not possible to disable the "new record" link in
TCA inline
elements, without simultaneously also disabling either the
"+" button in each inline records' header (using
['appearance']
) or all other
"level links" (using ['appearance']
).
To allow integrators to disable this link without any further side
effects, the option show
has been introduced
to TCA type inline
.
With this introduction, the already mentioned
['appearance']
option does from now on
only manage the display of the "+" button of each inline record and does
not longer affect the "New record" link.
Furthermore the ['appearance']
option does
no longer support none
as value. This option should only be used to
position the level links, not to hide them. This can be
achieved by setting the corresponding link specific options
show
, show
and
show
to false
. A TCA migration is in place,
replacing all TCA configurations, using the
['appearance']
option with none
as value
and showing where code adaptations need to take place.
If not set, the new show
option defaults to true
.
An example to disable the "New record" button:
'inlineField' => [
'label' => 'Inline without New record link',
'config' => [
'type' => 'inline',
'appearance' => [
'showNewRecordLink' => false,
],
],
],
Impact
It's now possible to disable the "New record" link of TCA inline
elements
without any side effects.