You are here

function pathauto_persist_entity_presave in Pathauto Persistent State 7

Implements hook_entity_presave().

File

./pathauto_persist.module, line 36

Code

function pathauto_persist_entity_presave($entity, $type) {
  if (isset($entity->path['pathauto']) && is_array($entity->path)) {

    // We must set an empty alias string for the path to prevent path.module
    // from saving an alias.
    $entity->path += array(
      'alias' => '',
    );
  }
}