Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit ab659003 authored by Gilmar Lima's avatar Gilmar Lima
Browse files

OEL-1167: Fix library commentary, and link icon definition.

parent af442895
No related branches found
No related tags found
2 merge requests!102Merge 1.x into EPIC-OEL-1255-migrate-paragraphs.,!94OEL-1167: Theme the content language switcher
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
declare(strict_types = 1); declare(strict_types = 1);
use Drupal\Component\Utility\Html;
/** /**
* Implements hook_preprocess_links(). * Implements hook_preprocess_links().
*/ */
...@@ -20,7 +18,7 @@ function oe_whitelabel_multilingual_preprocess_links__oe_multilingual_content_la ...@@ -20,7 +18,7 @@ function oe_whitelabel_multilingual_preprocess_links__oe_multilingual_content_la
$current_language_id = $currentLanguage->getId(); $current_language_id = $currentLanguage->getId();
$variables['unavailable_language'] = $languages[$current_language_id]->getName(); $variables['unavailable_language'] = $languages[$current_language_id]->getName();
// Normalize the links to an array of optional languages suitable for the ECL. // Normalize the links to an array of optional languages suitable for the BCL.
$variables['languages'] = []; $variables['languages'] = [];
foreach ($variables['links'] as $language_code => $link) { foreach ($variables['links'] as $language_code => $link) {
/** @var \Drupal\Core\Url $url */ /** @var \Drupal\Core\Url $url */
...@@ -48,20 +46,15 @@ function oe_whitelabel_multilingual_preprocess_links__oe_multilingual_content_la ...@@ -48,20 +46,15 @@ function oe_whitelabel_multilingual_preprocess_links__oe_multilingual_content_la
'hreflang' => $translation->language()->getId(), 'hreflang' => $translation->language()->getId(),
'label' => $languages[$translation->language()->getId()]->getName(), 'label' => $languages[$translation->language()->getId()]->getName(),
'current' => TRUE, 'current' => TRUE,
'icon_position' => "before", 'icon_position' => 'before',
'remove_icon_spacers' => TRUE, 'remove_icon_spacers' => FALSE,
'icon' => [ 'icon' => [
'name' => "check-lg", 'name' => "check-lg",
'path' => "/icons.svg", 'path' => $variables['bcl_icon_path'],
'size' => "xs", 'size' => "xs",
'#attributes' => [ '#attributes' => ['class' => ['me-2']],
'class' => ["me-2"],
],
], ],
]; ];
// Generate required ids.
$variables['expandable_id'] = Html::getUniqueId('ecl-expandable');
} }
/** /**
......
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