Skip to content

Commit

Permalink
EZP-29528: Content edit view is unstyled when multiple admin siteacce…
Browse files Browse the repository at this point in the history
…sses are configured (#616)
  • Loading branch information
ViniTou authored and Łukasz Serwatka committed Sep 17, 2018
1 parent 092a104 commit f66d154
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,28 @@ public function mapConfig(
$currentScope,
ContextualizerInterface $contextualizer
): void {
if (!empty($scopeSettings['admin_ui_forms']['content_edit_form_templates'])) {
$scopeSettings['admin_ui_forms.content_edit_form_templates'] = $this->processContentEditFormTemplates(
$scopeSettings['admin_ui_forms']['content_edit_form_templates']
);
unset($scopeSettings['admin_ui_forms']['content_edit_form_templates']);
}

$contextualizer->setContextualParameter(
static::FORM_TEMPLATES_PARAM,
$currentScope,
$this->processContentEditFormTemplates(
$scopeSettings['admin_ui_forms']['content_edit_form_templates'] ?? []
)
$scopeSettings['admin_ui_forms.content_edit_form_templates'] ?? []
);
}

/**
* {@inheritdoc}
*/
public function postMap(array $config, ContextualizerInterface $contextualizer)
{
$contextualizer->mapConfigArray('admin_ui_forms.content_edit_form_templates', $config);
}

/**
* Processes given prioritized list of templates, sorts them according to their priorities and
* returns as a simple list of templates.
Expand Down

0 comments on commit f66d154

Please sign in to comment.