public function LingotekControllerBase::connected in Lingotek Translation 4.0.x
Same name and namespace in other branches
- 8 src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 8.2 src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.0.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.1.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.2.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.3.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.4.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.5.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.6.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.7.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
- 3.8.x src/Controller/LingotekControllerBase.php \Drupal\lingotek\Controller\LingotekControllerBase::connected()
Checks if site is connected to Lingotek.
Return value
boolean TRUE if connected, FALSE otherwise.
File
- src/
Controller/ LingotekControllerBase.php, line 101
Class
- LingotekControllerBase
- Base class for handling all Lingotek-related routes.
Namespace
Drupal\lingotek\ControllerCode
public function connected() {
$access_token = $this->request->query
->get('access_token');
if ($access_token) {
$config = \Drupal::configFactory()
->getEditable('lingotek.settings');
$config
->set('access_token', $access_token);
$config
->save();
return TRUE;
}
return FALSE;
}