You are here

taxonomy_import.install in Taxonomy Import 8

Same filename and directory in other branches
  1. 2.x taxonomy_import.install

Uninstall functions for the Taxonomy Import module.

File

taxonomy_import.install
View source
<?php

/**
 * @file
 * Uninstall functions for the Taxonomy Import module.
 */

/**
 * Implements hook_uninstall().
 */
function taxonomy_import_uninstall() {

  // Delete file on uninstall.
  $files = db_query('SELECT file_managed.fid FROM file_managed WHERE uri LIKE :fid', [
    ':fid' => 'public://taxonomy_files/%',
  ]);
  foreach ($files as $val) {

    // Get location of the file.
    $location[] = $val->fid;
  }
  file_delete_multiple($location);

  // Remove directory on uninstall.
  rmdir('public://taxonomy_files/');
  drupal_flush_all_caches();
}

Functions

Namesort descending Description
taxonomy_import_uninstall Implements hook_uninstall().