You are here

public function MappingSteps::getBundles in GatherContent 8.5

Get list of bundle types.

Return value

array Assoc array of bundle types.

1 call to MappingSteps::getBundles()
MappingStepNew::getForm in gathercontent_ui/src/Form/MappingEditSteps/MappingStepNew.php
Returns form array.

File

gathercontent_ui/src/Form/MappingEditSteps/MappingSteps.php, line 605

Class

MappingSteps
Class MappingSteps.

Namespace

Drupal\gathercontent_ui\Form\MappingEditSteps

Code

public function getBundles($entityType) {
  $bundleTypes = \Drupal::service('entity_type.bundle.info')
    ->getBundleInfo($entityType);
  $response = [];
  foreach ($bundleTypes as $key => $value) {
    $response[$key] = $value['label'];
  }
  return $response;
}