You are here

protected function LingotekSettingsTabContentForm::retrieveBundles in Lingotek Translation 8

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

File

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

Class

LingotekSettingsTabContentForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

protected function retrieveBundles() {
  $entities = \Drupal::entityManager()
    ->getDefinitions();
  $this->bundles = array();
  foreach ($entities as $entity) {
    if ($entity instanceof ContentEntityType && $entity
      ->hasKey('langcode')) {
      $bundle = \Drupal::entityManager()
        ->getBundleInfo($entity
        ->id());
      $this->bundles[$entity
        ->id()] = $bundle;
    }
  }
}