You are here

public function LingotekSetupTrait::setupCompleted in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8 src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  2. 8.2 src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  3. 4.0.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  4. 3.0.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  5. 3.1.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  6. 3.2.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  7. 3.3.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  8. 3.4.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  9. 3.5.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  10. 3.7.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()
  11. 3.8.x src/LingotekSetupTrait.php \Drupal\lingotek\LingotekSetupTrait::setupCompleted()

Checks if Lingotek module is completely set up.

Return value

boolean TRUE if connected, FALSE otherwise.

2 calls to LingotekSetupTrait::setupCompleted()
LingotekSetupController::accountPage in src/Controller/LingotekSetupController.php
Presents a connection page to Lingotek Services
LingotekSetupTrait::checkSetup in src/LingotekSetupTrait.php
Verify the Lingotek Translation module has been properly initialized.

File

src/LingotekSetupTrait.php, line 35

Class

LingotekSetupTrait
Useful methods for checking if Lingotek is already setup.

Namespace

Drupal\lingotek

Code

public function setupCompleted() {
  $info = $this
    ->config('lingotek.settings')
    ->get('account');
  if (!empty($info['access_token']) && !empty($info['login_id'])) {
    return TRUE;
  }
  return FALSE;
}