Skip to content
Snippets Groups Projects
Commit 701b0d80 authored by Damian Lee's avatar Damian Lee Committed by Tim Plunkett
Browse files

Amended ViewStorageController::save for display settings

parent 8b23810c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -51,9 +51,9 @@ public function save(StorableInterface $entity) { ...@@ -51,9 +51,9 @@ public function save(StorableInterface $entity) {
$this->preSave($entity); $this->preSave($entity);
$this->invokeHook('presave', $entity); $this->invokeHook('presave', $entity);
// TODO: This temp measure will be removed once we have a better way or // @todo: This temp measure will be removed once we have a better way or
// separation of storage and the executed view. // separation of storage and the executed view.
$properties = array ( $config_properties = array (
'disabled', 'disabled',
'api_version', 'api_version',
'name', 'name',
...@@ -65,8 +65,17 @@ public function save(StorableInterface $entity) { ...@@ -65,8 +65,17 @@ public function save(StorableInterface $entity) {
'display', 'display',
); );
foreach ($properties as $property) { foreach ($config_properties as $property) {
$config->set($property, $entity->$property); if ($property == 'display') {
$displays = array();
foreach ($entity->display as $key => $display) {
$displays[$key] = $display->display_options;
}
$config->set('display', $displays);
}
else {
$config->set($property, $entity->$property);
}
} }
if (!$config->isNew()) { if (!$config->isNew()) {
......
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