You are here

public function InviteType::__construct in Invite 7.4

Overrides Entity::__construct

File

includes/invite.controller.inc, line 248

Class

InviteType
Invite Type class.

Code

public function __construct($values = array()) {
  parent::__construct($values, 'invite_type');
  if (empty($this->invite_sending_controller)) {
    $controllers = db_select('invite_sending_controller', 'isc')
      ->fields('isc')
      ->condition('type', array(
      $this->type,
    ))
      ->execute();
    $this->invite_sending_controller = array();
    foreach ($controllers as $controller) {
      $this->invite_sending_controller[$controller->name] = $controller->name;
    }
  }
}