You are here

function hook_redhen_contact_can_delete in RedHen CRM 7

Prevent a contact record from being deleted.

Parameters

string $contact:

Return value

bool

1 invocation of hook_redhen_contact_can_delete()
RedhenContactEntityController::delete in modules/redhen_contact/lib/redhen_contact.controller.inc
Deletes multiple contacts by ID.

File

./redhen.api.php, line 21
Hooks provided by the RedHen contact module.

Code

function hook_redhen_contact_can_delete(RedhenContact $contact) {

  // prevent the deletion of active contacts
  if ($contact->redhen_state == REDHEN_STATE_ACTIVE) {
    return FALSE;
  }
}