You are here

fancy_file_delete.install in Fancy File Delete 2.0.x

Same filename and directory in other branches
  1. 8 fancy_file_delete.install
  2. 7 fancy_file_delete.install

Install File for Fancy File Delete.

File

fancy_file_delete.install
View source
<?php

/**
 * @file
 * Install File for Fancy File Delete.
 */

/**
 * Implements hook_uninstall().
 */
function fancy_file_delete_uninstall() {
  $schema = \Drupal::database()
    ->schema();
  if ($schema
    ->tableExists('unmanaged_files')) {
    $schema
      ->dropTable('unmanaged_files');
  }
}

/**
 * Implements hook_install().
 */
function fancy_file_delete_install() {

  // So the views and actions are happy after install.
  drupal_flush_all_caches();
}

/**
 * 8001 - Reimports Config.
 */
function fancy_file_delete_update_8001() {
  \Drupal::service('config.installer')
    ->installDefaultConfig('module', 'fancy_file_delete');
  drupal_flush_all_caches();
}

Functions