You are here

function node_expire_uninstall in Node expire 8

Same name and namespace in other branches
  1. 5 node_expire.install \node_expire_uninstall()
  2. 6.2 node_expire.install \node_expire_uninstall()
  3. 6 node_expire.install \node_expire_uninstall()
  4. 7.2 node_expire.install \node_expire_uninstall()
  5. 7 node_expire.install \node_expire_uninstall()

Implements hook_uninstall().

File

./node_expire.install, line 63
Install, uninstall and update the module.

Code

function node_expire_uninstall() {

  // TODO The drupal_(un)install_schema
  // functions are called automatically in D7.
  // drupal_uninstall_schema('node_expire').
  //
  // Delete global variable.
  \Drupal::config('node_expire.settings')
    ->clear('node_expire_ntypes')
    ->save();

  // Delete configuration variables.
  \Drupal::config('node_expire.settings')
    ->clear('node_expire_handle_content_expiry')
    ->save();
  \Drupal::config('node_expire.settings')
    ->clear('node_expire_date_entry_elements')
    ->save();
  \Drupal::config('node_expire.settings')
    ->clear('node_expire_past_date_allowed')
    ->save();

  // Delete node type related variables.
  $types = node_type_get_types();
  foreach ($types as $type) {

    // @FIXME
    // // @FIXME
    // // The correct configuration object could not be determined. You'll need to
    // // rewrite this call manually.
    // variable_del('node_expire_' . $type->type);
    // @FIXME
    // // @FIXME
    // // The correct configuration object could not be determined. You'll need to
    // // rewrite this call manually.
    // variable_del('node_expire_enabled_' . $type->type);
    // @FIXME
    // // @FIXME
    // // The correct configuration object could not be determined. You'll need to
    // // rewrite this call manually.
    // variable_del('node_expire_max_' . $type->type);
    // @FIXME
    // // @FIXME
    // // The correct configuration object could not be determined. You'll need to
    // // rewrite this call manually.
    // variable_del('node_expire_required_' . $type->type);
  }
}