You are here

function pm_uninstall_variables in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 includes/pm.install.inc \pm_uninstall_variables()

Deletes variables set by a specified module.

11 calls to pm_uninstall_variables()
pmexpense_uninstall in pmexpense/pmexpense.install
Implements hook_uninstall().
pmissue_uninstall in pmissue/pmissue.install
Implements hook_uninstall().
pmnote_uninstall in pmnote/pmnote.install
Implements hook_uninstall().
pmorganization_uninstall in pmorganization/pmorganization.install
Implements hook_uninstall().
pmperson_uninstall in pmperson/pmperson.install
Implements hook_uninstall().

... See full list

File

includes/pm.install.inc, line 43
Helper functions for install, disable, uninstall and update of PM modules.

Code

function pm_uninstall_variables($module) {

  // All variables in the module namespace.
  db_delete('variable')
    ->condition('name', $module . '_%', 'LIKE')
    ->execute();

  // Content type variables.
  variable_del('node_options_' . $module);

  // PM Permission configuration for the specified module.
  variable_del('pm_permission_node_' . $module . '_enabled');
  variable_del('pm_permission_field_parent_reference_for_' . $module);
}