Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. View.php

function View::postSave

Overrides EntityBase::postSave

File

core/modules/views/src/Entity/View.php, line 344

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
    parent::postSave($storage, $update);
    // @todo Remove if views implements a view_builder controller.
    views_invalidate_cache();
    $this->invalidateCaches();
    // Rebuild the router if this is a new view, or its status changed.
    if (!isset($this->original) || $this->status() != $this->original
        ->status()) {
        \Drupal::service('router.builder')->setRebuildNeeded();
    }
}
RSS feed
Powered by Drupal