You are here

protected function LingotekSetupController::saveToken in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 8 src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  2. 8.2 src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  3. 4.0.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  4. 3.0.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  5. 3.1.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  6. 3.2.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  7. 3.4.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  8. 3.5.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  9. 3.6.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  10. 3.7.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
  11. 3.8.x src/Controller/LingotekSetupController.php \Drupal\lingotek\Controller\LingotekSetupController::saveToken()
1 call to LingotekSetupController::saveToken()
LingotekSetupController::handshake in src/Controller/LingotekSetupController.php

File

src/Controller/LingotekSetupController.php, line 113

Class

LingotekSetupController
Returns responses for lingotek module setup routes.

Namespace

Drupal\lingotek\Controller

Code

protected function saveToken($token) {
  if (!empty($token)) {
    \Drupal::configFactory()
      ->getEditable('lingotek.settings')
      ->set('account.access_token', $token)
      ->save();
  }
}