Feature: #109370 - Array-based queryParameters for page links
See forge#109370
Description
When page links are created programmatically by the
Link PHP API,
query parameters previously had to be provided as a URL-encoded string in
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 as an
array, eliminating the previous serialize/deserialize round trip 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.