Commit 701b0d80 authored by damiankloip's avatar damiankloip Committed by tim.plunkett
Browse files

Amended ViewStorageController::save for display settings

parent 8b23810c
......@@ -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()) {
......
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