You are here

function hook_profile2_type_delete in Profile 2 7.2

Same name and namespace in other branches
  1. 7 profile2.api.php \hook_profile2_type_delete()

Respond to profile type deletion.

This hook is invoked after the profile type has been removed from the database.

Parameters

$type: The profile type that is being deleted.

2 functions implement hook_profile2_type_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

profile2_i18n_profile2_type_delete in contrib/profile2_i18n.module
Implements hook_profile2_type_delete().
profile2_profile2_type_delete in ./profile2.module
Implements hook_profile2_type_delete()

File

./profile2.api.php, line 220
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_profile2_type_delete($type) {
  db_delete('mytable')
    ->condition('id', $type->id)
    ->execute();
}