You are here

public function LingotekAccount::setPlanType in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::setPlanType()
  2. 7.3 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::setPlanType()
  3. 7.4 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::setPlanType()
  4. 7.6 lib/Drupal/lingotek/LingotekAccount.php \LingotekAccount::setPlanType()
2 calls to LingotekAccount::setPlanType()
LingotekAccount::setPlan in lib/Drupal/lingotek/LingotekAccount.php
LingotekAccount::__construct in lib/Drupal/lingotek/LingotekAccount.php
Constructor.

File

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

Class

LingotekAccount
A class representing a Lingotek Account

Code

public function setPlanType($type = 'unknown') {
  variable_set('lingotek_account_plan_type', $type);
  $standard_types = array(
    'cosmopolitan_monthly',
    'cosmopolitan_yearly',
  );

  // if in this list, then set to 'standard'
  $type = in_array($type, $standard_types) ? 'standard' : $type;
  $this->planType = $type;
}