You are here

public function Migrator::entityTypeOptions in Lightning Workflow 8.3

Same name and namespace in other branches
  1. 8.2 modules/lightning_scheduler/src/Migrator.php \Drupal\lightning_scheduler\Migrator::entityTypeOptions()

Converts a set of entity type definitions to key/value options.

Parameters

\Drupal\Core\Entity\EntityTypeInterface[] $entity_types: The entity type definitions.

Return value

string[] The entity type labels, keyed by entity type ID.

1 call to Migrator::entityTypeOptions()
Migrator::generatePreMigrationMessage in modules/lightning_scheduler/src/Migrator.php
Generates a message to be shown before migrating a set of entity types.

File

modules/lightning_scheduler/src/Migrator.php, line 354

Class

Migrator
The migration is not an API and should not be extended or re-used.

Namespace

Drupal\lightning_scheduler

Code

public function entityTypeOptions(array $entity_types) {
  $to_option = function (EntityTypeInterface $entity_type) {
    return $entity_type
      ->getPluralLabel();
  };
  return array_map($to_option, $entity_types);
}