You are here

public function RedhenContact::setState in RedHen CRM 7

Set the redhen_state for a contact.

Parameters

int $state: The REDHEN_STATE_* value to use.

File

modules/redhen_contact/lib/redhen_contact.entity.inc, line 202
Redhen Contact entity classses.

Class

RedhenContact
The class used for contact entities.

Code

public function setState($state) {

  // Allow other modules to act on a state change.
  module_invoke_all('redhen_contact_set_state', $this->redhen_state, $state);
  $this->redhen_state = $state;
  return entity_get_controller($this->entityType)
    ->save($this);
}