You are here

pathauto_entity.install in Pathauto Entity 7

File

pathauto_entity.install
View source
<?php

/**
 * Implements hook_uninstall().
 */
function pathauto_entity_uninstall() {
  module_load_include('module', 'pathauto_entity');
  $entities = pathauto_entity_available_entity_types();
  if (isset($entities)) {
    foreach ($entities as $type => $status) {

      // Remove all variables.
      $results = db_select('variable', 'v')
        ->fields('v', array(
        'name',
      ))
        ->condition('name', 'pathauto_' . $type . '_%', 'LIKE')
        ->execute();
      foreach ($results as $result) {
        variable_del($result->name);
      }
    }
  }

  // Remove all variables.
  $results = db_select('variable', 'v')
    ->fields('v', array(
    'name',
  ))
    ->condition('name', 'pathauto_entity_%', 'LIKE')
    ->execute();
  foreach ($results as $result) {
    variable_del($result->name);
  }
}

Functions

Namesort descending Description
pathauto_entity_uninstall Implements hook_uninstall().