diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 9610e29..63e7e6b 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -301,6 +301,11 @@ public function calculateDependencies() { public function preSave(EntityStorageInterface $storage) { parent::preSave($storage); + // Sort the displays. + $display = $this->get('display'); + ksort($display); + $this->set('display', array('default' => $display['default']) + $display); + // @todo Check whether isSyncing is needed. if (!$this->isSyncing()) { $this->addCacheMetadata(); @@ -340,18 +345,6 @@ protected function addCacheMetadata() { /** * {@inheritdoc} */ - public function preSave(EntityStorageInterface $storage) { - parent::preSave($storage); - - // Sort the displays. - $display = $this->get('display'); - ksort($display); - $this->set('display', array('default' => $display['default']) + $display); - } - - /** - * {@inheritdoc} - */ public function postSave(EntityStorageInterface $storage, $update = TRUE) { parent::postSave($storage, $update);