You are here

pmpapi_permissions.install in Public Media Platform API Integration 7

Install, update and uninstall functions for the pmpapi_permissions module.

File

pmpapi_permissions/pmpapi_permissions.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the pmpapi_permissions module.
 */

/**
 * Implements hook_uninstall().
 */
function pmpapi_permissions_uninstall() {
  module_load_include('module', 'pmpapi_push');
  module_load_include('module', 'pmpapi');
  foreach (pmpapi_push_get_entities() as $entity_type => $entity) {
    foreach ($entity['bundles'] as $bundle_name => $bundle) {
      $uname = $entity_type . '__' . $bundle_name;
      variable_del('pmpapi_permissions_default_group_' . $uname);
      variable_del('pmpapi_permissions_default_list_type_' . $uname);
    }
  }
}

Functions