You are here

protected function BulkEditForm::getEntitiesByBundle in Views Bulk Edit 8

Gets the loaded entities.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of loaded entities.

1 call to BulkEditForm::getEntitiesByBundle()
BulkEditForm::submitForm in src/Form/BulkEditForm.php
Form submission handler.

File

src/Form/BulkEditForm.php, line 255

Class

BulkEditForm
The bulk edit form.

Namespace

Drupal\views_bulk_edit\Form

Code

protected function getEntitiesByBundle() {
  $entities_by_bundle = [];
  foreach ($this
    ->getBulkEditEntityData() as $entity_type_id => $bundle_entity_ids) {
    foreach ($bundle_entity_ids as $bundle => $entity_ids) {
      $entities_by_bundle[$bundle] = $this->entityTypeManager
        ->getStorage($entity_type_id)
        ->loadMultiple($entity_ids);
    }
  }
  return $entities_by_bundle;
}