Refactored attachDisplays() method to use get/set methods
parent
752319c127
commit
e01e4194dc
|
@ -273,4 +273,4 @@ class ViewStorage extends ConfigurableBase {
|
|||
$this->set_item($display_id, $type, $id, $item);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,11 +110,13 @@ class ViewStorageController extends ConfigStorageController {
|
|||
*/
|
||||
protected function attachDisplays(&$entity) {
|
||||
if (isset($entity->display) && is_array($entity->display)) {
|
||||
foreach ($entity->display as $key => $options) {
|
||||
$displays = array();
|
||||
foreach ($entity->get('display') as $key => $options) {
|
||||
// Create a ViewsDisplay object using the display options.
|
||||
$entity->display[$key] = new ViewsDisplay($options);
|
||||
$displays[$key] = new ViewsDisplay($options);
|
||||
}
|
||||
$entity->set('display', $displays);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue