You are here

public function Contact::setActive in RedHen CRM 8

Sets the active status of a Contact.

Parameters

bool $active: TRUE to set this Contact to active, FALSE to set it to inactive.

Return value

\Drupal\redhen_contact\ContactInterface The called Contact entity.

Overrides ContactInterface::setActive

File

modules/redhen_contact/src/Entity/Contact.php, line 204

Class

Contact
Defines the Contact entity.

Namespace

Drupal\redhen_contact\Entity

Code

public function setActive($active) {
  $this
    ->set('status', $active ? REDHEN_CONTACT_INACTIVE : REDHEN_CONTACT_ACTIVE);
  return $this;
}