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

Breadcrumb

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

function PathAlias::postSave

Overrides ContentEntityBase::postSave

File

core/modules/path_alias/src/Entity/PathAlias.php, line 108

Class

PathAlias
Defines the path_alias entity class.

Namespace

Drupal\path_alias\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
    parent::postSave($storage, $update);
    $alias_manager = \Drupal::service('path_alias.manager');
    $alias_manager->cacheClear($this->getPath());
    if ($update) {
        $alias_manager->cacheClear($this->original
            ->getPath());
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal