You are here

function pathauto_entity_insert in Pathauto 8

Same name and namespace in other branches
  1. 7 pathauto.module \pathauto_entity_insert()

Implements hook_entity_insert().

File

./pathauto.module, line 85
pathauto Pathauto: Automatically generates aliases for content

Code

function pathauto_entity_insert(EntityInterface $entity) {
  \Drupal::service('pathauto.generator')
    ->updateEntityAlias($entity, 'insert');
}