Skip to content
Snippets Groups Projects
Commit 9c7eba93 authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Merge branch '3490733-linkproptype-normalization-again' into '2.0.x'

Issue #3490733 by grimreaper: LinkPropType normalization...again

See merge request !280
parents 6329e608 e7baca91
No related branches found
No related tags found
No related merge requests found
Pipeline #354752 passed
......@@ -122,6 +122,7 @@ class LinksPropType extends PropTypePluginBase implements ContainerFactoryPlugin
$item["title"] = $item["text"];
unset($item["text"]);
}
$item["title"] = static::normalizeTitle($item["title"]);
if (array_key_exists("href", $item)) {
// Examples: pager.html.twig, views_mini_pager.html.twig.
......@@ -137,6 +138,17 @@ class LinksPropType extends PropTypePluginBase implements ContainerFactoryPlugin
return $item;
}
/**
* Normalize title in an item.
*/
protected static function normalizeTitle(mixed $title): mixed {
// For pager.
if (is_int($title)) {
$title = (string) $title;
}
return $title;
}
/**
* Normalize attributes in an item.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment