diff --git a/lib/Drupal/views/ViewStorageController.php b/lib/Drupal/views/ViewStorageController.php index 9f8944f4ae10f93a185bc06b785bfcc80142a717..305ffa5cf5ae7c542685d2b49cc4b3aea275c05e 100644 --- a/lib/Drupal/views/ViewStorageController.php +++ b/lib/Drupal/views/ViewStorageController.php @@ -51,9 +51,9 @@ public function save(StorableInterface $entity) { $this->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. - $properties = array ( + $config_properties = array ( 'disabled', 'api_version', 'name', @@ -65,8 +65,17 @@ public function save(StorableInterface $entity) { 'display', ); - foreach ($properties as $property) { - $config->set($property, $entity->$property); + foreach ($config_properties as $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()) {