Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Prevent PHP 8.1 issues for formValues usage #473

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions typo3/sysext/form/Documentation/I/Concepts/Variants/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ incomplete - example:
variants:
-
identifier: variant-1
condition: 'formValues["checkbox-1"] == 1'
condition: 'traverse(formValues, "checkbox-1") == 1'
# If the condition matches, the label property of the form
# element is set to the value 'Bar'
label: Bar
Expand Down Expand Up @@ -164,7 +164,7 @@ current renderable without having to duplicate it.

For example:

:yaml:`formValues[renderable.getIdentifier()] == "special value"`.
:yaml:`traverse(formValues, renderable.getIdentifier()) == "special value"`.


``formValues`` (array)
Expand All @@ -175,7 +175,7 @@ key within this array represents a form element identifier.

For example:

:yaml:`formValues["text-1"] == "yes"`.
:yaml:`traverse(formValues, "text-1") == "yes"`.


``stepIdentifier`` (string)
Expand Down Expand Up @@ -260,7 +260,7 @@ Create a variant with conditions through the PHP API::
/** @var TYPO3\CMS\Form\Domain\Model\Renderable\RenderableVariantInterface $variant */
$variant = $formElement->createVariant([
'identifier' => 'variant-1',
'condition' => 'formValues["checkbox-1"] == 1',
'condition' => 'traverse(formValues, "checkbox-1") == 1',
'label' => 'foo',
]);

Expand Down Expand Up @@ -371,7 +371,7 @@ In this example a bunch of validators are added to the field
variants:
-
identifier: validation-1
condition: 'formValues["checkbox-1"] == 1'
condition: 'traverse(formValues, "checkbox-1") == 1'
properties:
fluidAdditionalAttributes:
required: required
Expand Down Expand Up @@ -509,7 +509,7 @@ In this example the second step :yaml:`page-2` is disabled if the field
variants:
-
identifier: variant-2
condition: 'formValues["checkbox-1"] == 1'
condition: 'traverse(formValues, "checkbox-1") == 1'
renderingOptions:
enabled: false
renderables:
Expand Down