You are here

protected function LingotekSettingsDefaultsForm::setCallbackUrl in Lingotek Translation 8

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

Parameters

$config:

1 call to LingotekSettingsDefaultsForm::setCallbackUrl()
LingotekSettingsDefaultsForm::submitForm in src/Form/LingotekSettingsDefaultsForm.php
Form submission handler.

File

src/Form/LingotekSettingsDefaultsForm.php, line 95
Contains \Drupal\lingotek\Form\LingotekSettingsProjectVaultForm.

Class

LingotekSettingsDefaultsForm
Configure text display settings for this page.

Namespace

Drupal\lingotek\Form

Code

protected function setCallbackUrl($config) {
  $new_callback_url = \Drupal::urlGenerator()
    ->generateFromRoute('lingotek.notify', [], [
    'absolute' => TRUE,
  ]);
  $config
    ->set('account.callback_url', $new_callback_url);
  $new_response = $this->lingotek
    ->setProjectCallBackUrl($config
    ->get('default.project'), $new_callback_url);
  $config
    ->save();
}