public function MetaTagDownloadForm::getEntityTypes in Metatag Import Export CSV 8
Returns entity types.
1 call to MetaTagDownloadForm::getEntityTypes()
- MetaTagDownloadForm::buildForm in src/
Form/ MetaTagDownloadForm.php - Form constructor.
File
- src/
Form/ MetaTagDownloadForm.php, line 80
Class
- MetaTagDownloadForm
- Defines a form that configures forms module settings.
Namespace
Drupal\metatag_import_export_csv\FormCode
public function getEntityTypes() {
$entity_types = [];
$entity_type_manager = \Drupal::service('entity_type.manager');
foreach ($entity_type_manager
->getDefinitions() as $entity_type_id => $entity_type) {
if ($entity_type
->getGroup() != 'content') {
continue;
}
$entity_types[$entity_type_id] = $entity_type
->getLabel();
}
natcasesort($entity_types);
return $entity_types;
}