You are here

protected function LingotekManagementFormBase::getAllBundles in Lingotek Translation 3.4.x

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

Gets all the bundles as options.

Return value

array The bundles as a valid options array.

1 call to LingotekManagementFormBase::getAllBundles()
LingotekManagementForm::getFilters in src/Form/LingotekManagementForm.php
Gets the filters for rendering.

File

src/Form/LingotekManagementFormBase.php, line 1589

Class

LingotekManagementFormBase
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function getAllBundles() {
  $bundles = $this->entityTypeBundleInfo
    ->getBundleInfo($this->entityTypeId);
  $options = [];
  foreach ($bundles as $id => $bundle) {
    $options[$id] = $bundle['label'];
  }
  return $options;
}