You are here

function pathauto_entity_state_delete in Pathauto 7

Delete the pathauto state for an entity.

Parameters

string $entity_type: The entity type.

object $entity: The entity object.

1 call to pathauto_entity_state_delete()
pathauto_entity_delete in ./pathauto.module
Implements hook_entity_delete().

File

./pathauto.module, line 504
Main file for the Pathauto module, which automatically generates aliases for content.

Code

function pathauto_entity_state_delete($entity_type, $entity) {
  list($entity_id) = entity_extract_ids($entity_type, $entity);
  db_delete('pathauto_state')
    ->condition('entity_type', $entity_type)
    ->condition('entity_id', $entity_id)
    ->execute();
  drupal_static_reset('pathauto_entity_load');
}