decoupled_router.module in Decoupled Router 8
Same filename and directory in other branches
Module implementation file.
File
decoupled_router.moduleView source
<?php
/**
* @file
* Module implementation file.
*/
use Drupal\path_alias\PathAliasInterface;
/**
* Implements hook_path_update().
*/
function decoupled_router_path_update($path) {
\Drupal::service('decoupled_router.cache_invalidation')
->invalidateByPath($path);
}
/**
* Implements hook_ENTITY_TYPE_insert().
*/
function decoupled_router_path_alias_insert(PathAliasInterface $path_alias) {
\Drupal::service('decoupled_router.cache_invalidation')
->invalidateByPath([
'source' => $path_alias
->getAlias(),
]);
}
/**
* Implements hook_path_delete().
*/
function decoupled_router_path_delete($path) {
\Drupal::service('decoupled_router.cache_invalidation')
->invalidateByPath($path);
}
Functions
Name | Description |
---|---|
decoupled_router_path_alias_insert | Implements hook_ENTITY_TYPE_insert(). |
decoupled_router_path_delete | Implements hook_path_delete(). |
decoupled_router_path_update | Implements hook_path_update(). |