You are here

public function LingotekConfigurationService::getProfileOptions in Lingotek Translation 8

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

Helper function for getting all the profiles as select options.

Return value

array Profiles as a valid select options property.

Overrides LingotekConfigurationServiceInterface::getProfileOptions

File

src/LingotekConfigurationService.php, line 166
Contains \Drupal\lingotek\LingotekConfigurationService.

Class

LingotekConfigurationService
Service for managing lingotek configuration.

Namespace

Drupal\lingotek

Code

public function getProfileOptions() {
  $profiles = \Drupal::entityManager()
    ->getListBuilder('lingotek_profile')
    ->load();
  foreach ($profiles as $profile) {

    /** \Drupal\lingotek\LingotekProfileInterface $profile */
    $options[$profile
      ->id()] = $profile
      ->label();
  }
  return $options;
}