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
No related merge requests found
......@@ -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()) {
......
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