You are here

public function LingotekAccount::__construct in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::__construct()
  2. 7.3 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::__construct()
  3. 7.4 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::__construct()
  4. 7.5 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::__construct()
  5. 7.6 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::__construct()

Constructor.

Sets default values

File

lib/Drupal/lingotek/LingotekAccount.php, line 36
Defines LingotekAccount.

Class

LingotekAccount
A class representing a Lingotek Account

Code

public function __construct() {
  $this->status = self::UNKNOWN;
  $this->planType = self::UNKNOWN;

  // assume an standard active account
  $current_status = variable_get('lingotek_account_status', self::ACTIVE);
  $current_plan_type = variable_get('lingotek_account_plan_type', 'standard');
  if (isset($current_status) && isset($current_plan_type)) {
    $this
      ->setStatus($current_status);
    $this
      ->setPlanType($current_plan_type);
  }
}