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

Breadcrumb

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

function PathAlias::postDelete

Overrides EntityBase::postDelete

File

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

Class

PathAlias
Defines the path_alias entity class.

Namespace

Drupal\path_alias\Entity

Code

public static function postDelete(EntityStorageInterface $storage, array $entities) {
    parent::postDelete($storage, $entities);
    $alias_manager = \Drupal::service('path_alias.manager');
    foreach ($entities as $entity) {
        $alias_manager->cacheClear($entity->getPath());
    }
}

API Navigation

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