Skip to content
Snippets Groups Projects
Commit 8209dda8 authored by Igor Biki's avatar Igor Biki Committed by Kevin Paxman
Browse files

ISTWCMS-6306: Removing internal: substring from any links on display and form.

parent 27dbb38e
No related branches found
No related tags found
1 merge request!258ISTWCMS-6306: Removing internal: substring from any links on display and form.
......@@ -262,6 +262,7 @@ class UwCblLinks extends BlockBase implements ContainerFactoryPluginInterface {
// Get the friendly path. Anything that doesn't have
// one will return the "real" path.
$value = str_replace("internal:", "", $value);
$pathauto = $this->pathAliasManager
->getAliasByPath($value);
......@@ -455,8 +456,10 @@ class UwCblLinks extends BlockBase implements ContainerFactoryPluginInterface {
// If there is a link already set, setup the details to
// have the link in the title so when it is closed,
// we can see what the actual is.
$value_uri = str_replace("internal:", "", $links['items'][$i]['uri'] ?? '');
if (isset($links['items'][$i]['uri'])) {
$link = $this->t('Link (@uri)', ['@uri' => $links['items'][$i]['uri']]);
$link = $this->t('Link (@uri)', ['@uri' => $value_uri]);
}
else {
$link = $this->t('Link');
......@@ -480,7 +483,7 @@ class UwCblLinks extends BlockBase implements ContainerFactoryPluginInterface {
'#autocomplete_route_parameters' => [
'linkit_profile_id' => 'default',
],
'#default_value' => $links['items'][$i]['uri'] ?? '',
'#default_value' => $value_uri,
'#required' => FALSE,
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment