You are here

function easy_breadcrumb_uninstall in Easy Breadcrumb 6

Same name and namespace in other branches
  1. 7.2 easy_breadcrumb.install \easy_breadcrumb_uninstall()
  2. 7 easy_breadcrumb.install \easy_breadcrumb_uninstall()

Implements hook_uninstall().

File

./easy_breadcrumb.install, line 10
Install hooks.

Code

function easy_breadcrumb_uninstall() {
  require_once 'includes/EasyBreadcrumbConstants.inc';

  // Use reflection for getting constants.
  $o_class = new ReflectionClass('EasyBreadcrumbConstants');
  $constants = $o_class
    ->getConstants();

  // Deletes all the created variables by this module.
  foreach ($constants as $constant_name => $constant_value) {

    // The database variables are named using the prefix 'DB_VAR'.
    if (strpos($constant_name, 'DB_VAR_') === 0) {
      variable_del($constant_value);
    }
  }
}