You are here

protected function LingotekSettingsTabContentForm::retrieveProfiles in Lingotek Translation 8

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

File

src/Form/LingotekSettingsTabContentForm.php, line 202
Contains \Drupal\lingotek\Form\LingotekSettingsTabContentForm.

Class

LingotekSettingsTabContentForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

protected function retrieveProfiles($entity_id, $bundle_id) {

  /** @var \Drupal\lingotek\LingotekConfigurationServiceInterface $lingotek_config */
  $lingotek_config = \Drupal::service('lingotek.configuration');
  $select = array(
    '#type' => 'select',
    '#options' => $lingotek_config
      ->getProfileOptions(),
    '#default_value' => $lingotek_config
      ->getDefaultProfileId($entity_id, $bundle_id),
  );
  return $select;
}