You are here

public function RedhenOrg::__construct in RedHen CRM 7

Override parent constructor.

Overrides Entity::__construct

File

modules/redhen_org/lib/redhen_org.entity.inc, line 27
Redhen Group entity classes

Class

RedhenOrg
The class used for group entities.

Code

public function __construct(array $values = array()) {
  global $user;
  parent::__construct($values, 'redhen_org');

  // New organization. is_new might not be set so check for id.
  if (!$this->org_id) {
    $this->author_uid = $user->uid;
    $this->redhen_state = REDHEN_STATE_ACTIVE;
    $this->created = REQUEST_TIME;
  }
}