Mercurial > hg > isophonics-drupal-site
comparison core/modules/views/src/Entity/View.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | c2387f117808 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
243 // Let the display title be generated by the addDisplay method and set the | 243 // Let the display title be generated by the addDisplay method and set the |
244 // right display plugin, but keep the rest from the original display. | 244 // right display plugin, but keep the rest from the original display. |
245 $display_duplicate = $displays[$old_display_id]; | 245 $display_duplicate = $displays[$old_display_id]; |
246 unset($display_duplicate['display_title']); | 246 unset($display_duplicate['display_title']); |
247 unset($display_duplicate['display_plugin']); | 247 unset($display_duplicate['display_plugin']); |
248 unset($display_duplicate['new_id']); | |
248 | 249 |
249 $displays[$new_display_id] = NestedArray::mergeDeep($displays[$new_display_id], $display_duplicate); | 250 $displays[$new_display_id] = NestedArray::mergeDeep($displays[$new_display_id], $display_duplicate); |
250 $displays[$new_display_id]['id'] = $new_display_id; | 251 $displays[$new_display_id]['id'] = $new_display_id; |
251 | 252 |
252 // First set the displays. | 253 // First set the displays. |
385 | 386 |
386 // @todo Remove if views implements a view_builder controller. | 387 // @todo Remove if views implements a view_builder controller. |
387 views_invalidate_cache(); | 388 views_invalidate_cache(); |
388 $this->invalidateCaches(); | 389 $this->invalidateCaches(); |
389 | 390 |
390 // Rebuild the router if this is a new view, or it's status changed. | 391 // Rebuild the router if this is a new view, or its status changed. |
391 if (!isset($this->original) || ($this->status() != $this->original->status())) { | 392 if (!isset($this->original) || ($this->status() != $this->original->status())) { |
392 \Drupal::service('router.builder')->setRebuildNeeded(); | 393 \Drupal::service('router.builder')->setRebuildNeeded(); |
393 } | 394 } |
394 } | 395 } |
395 | 396 |
454 * {@inheritdoc} | 455 * {@inheritdoc} |
455 */ | 456 */ |
456 public static function postDelete(EntityStorageInterface $storage, array $entities) { | 457 public static function postDelete(EntityStorageInterface $storage, array $entities) { |
457 parent::postDelete($storage, $entities); | 458 parent::postDelete($storage, $entities); |
458 | 459 |
459 $tempstore = \Drupal::service('user.shared_tempstore')->get('views'); | 460 $tempstore = \Drupal::service('tempstore.shared')->get('views'); |
460 foreach ($entities as $entity) { | 461 foreach ($entities as $entity) { |
461 $tempstore->delete($entity->id()); | 462 $tempstore->delete($entity->id()); |
462 } | 463 } |
463 } | 464 } |
464 | 465 |