You are here

public function LingotekSettingsAccountForm::buildForm in Lingotek Translation 8

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

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfigFormBase::buildForm

File

src/Form/LingotekSettingsAccountForm.php, line 27
Contains \Drupal\lingotek\Form\LingotekSettingsAccountForm.

Class

LingotekSettingsAccountForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $form['account']['connected'] = array();
  $form['account']['login_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Login'),
    '#description' => t('The login used to connect with the Lingotek service.'),
    '#value' => $this->lingotek
      ->get('account.login_id'),
    '#disabled' => TRUE,
  );
  $form['account']['access_token'] = array(
    '#type' => 'textfield',
    '#title' => t('Access Token'),
    '#description' => t('The token currently useed when communicating with the Lingotek service.'),
    '#value' => $this->lingotek
      ->get('account.access_token'),
    '#disabled' => TRUE,
  );

  // Provide new button to continue
  $form['actions']['submit']['#value'] = t('Next');
  return $form;
}