Commit 5dd890d1 authored by Pawel G's avatar Pawel G

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

Issue #3056495 by johnjw59, 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
->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
->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