Commit 5dd890d1 authored by gbyte.co's avatar gbyte.co

Issue #3056495 by johnjw59, gbyte.co: Set current variant when getting...

Issue #3056495 by johnjw59, gbyte.co: Set current variant when getting menu_link_content instance settings
parent ba70e495
......@@ -241,7 +241,8 @@ class FormHelper {
//todo Should spit out variant => settings and not just settings; to do this, alter getEntityInstanceSettings() to include 'multiple variants' option.
foreach ($this->settings as $variant_name => $settings) {
if (NULL !== $instance_id = $this->getInstanceId()) {
$this->settings[$variant_name] = $this->generator->setVariants($variant_name)
$this->settings[$variant_name] = $this->generator
->setVariants($variant_name)
->getEntityInstanceSettings($this->getEntityTypeId(), $instance_id);
}
$this->settings[$variant_name]['bundle_settings'] = $settings;
......
......@@ -146,7 +146,9 @@ class EntityMenuLinkContentUrlGenerator extends EntityUrlGeneratorBase {
// If menu link is of entity type menu_link_content, take under account its entity override.
else {
$entity_settings = $this->generator->getEntityInstanceSettings('menu_link_content', $meta_data['entity_id']);
$entity_settings = $this->generator
->setVariants($this->sitemapVariant)
->getEntityInstanceSettings('menu_link_content', $meta_data['entity_id']);
if (empty($entity_settings['index'])) {
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment