public function Migrator::entityTypeOptions in Lightning Workflow 8.2
Same name and namespace in other branches
- 8.3 modules/lightning_scheduler/src/Migrator.php \Drupal\lightning_scheduler\Migrator::entityTypeOptions()
Converts a set of entity type definitions to key/value options.
Parameters
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 an informational message to be displayed before starting the migration for a set of entity types.
File
- modules/
lightning_scheduler/ src/ Migrator.php, line 358
Class
- Migrator
- This class is final because the migration is not an API and should not be extended or re-used.
Namespace
Drupal\lightning_schedulerCode
public function entityTypeOptions(array $entity_types) {
$to_option = function (EntityTypeInterface $entity_type) {
return $entity_type
->getPluralLabel();
};
return array_map($to_option, $entity_types);
}