protected function ImporterForm::getEntityTypeOptions in CSV Importer 8
Get entity type options.
Return value
array Entity type options.
1 call to ImporterForm::getEntityTypeOptions()
- ImporterForm::buildForm in src/
Form/ ImporterForm.php - Form constructor.
File
- src/
Form/ ImporterForm.php, line 209
Class
- ImporterForm
- Provides CSV importer form.
Namespace
Drupal\csv_importer\FormCode
protected function getEntityTypeOptions() {
$options = [];
$plugin_definitions = $this->importer
->getDefinitions();
foreach ($plugin_definitions as $definition) {
$entity_type = $definition['entity_type'];
if ($this->entityTypeManager
->hasDefinition($entity_type)) {
$entity = $this->entityTypeManager
->getDefinition($entity_type);
$options[$entity_type] = $entity
->getLabel();
}
}
return $options;
}