Feature: #109370 - Array-based queryParameters for Page Links
See forge#109370
Description
When creating page links programmatically via the
Link PHP API,
query parameters previously had to be provided as a URL-encoded string using
the
additional configuration key. A new
query
configuration key has been introduced that accepts a PHP array, including
multi-dimensional arrays.
When both
query and
additional are set, they are
merged using
array_, with
query
taking precedence.
Example:
$linkFactory->create('Link text', [
'parameter' => 42,
'queryParameters' => [
'tx_news' => [
'action' => 'show',
'id' => 123,
],
],
], $contentObjectRenderer);
The Fluid ViewHelpers
<f:,
<f:,
<f: and
<f: now use this option
internally to pass their
additional argument directly as an
array, eliminating a previous serialize/deserialize roundtrip via query
string encoding.
Impact
Developers creating page links via the
Link PHP API can now pass
query parameters as structured arrays via the
query
configuration key. This avoids manual query string encoding and makes
multi-dimensional parameter handling more natural.
The option can be combined with the existing string-based
additional. When both are provided,
query values
override matching keys from
additional.