protected function ScheduledUpdateTypeForm::entityTypeOptions in Scheduled Updates 8
Create select element entity type options.
Return value
array
1 call to ScheduledUpdateTypeForm::entityTypeOptions()
- ScheduledUpdateTypeForm::form in src/
Form/ ScheduledUpdateTypeForm.php - Gets the actual form array to be built.
File
- src/
Form/ ScheduledUpdateTypeForm.php, line 89 - Contains \Drupal\scheduled_updates\Form\ScheduledUpdateTypeForm.
Class
- ScheduledUpdateTypeForm
- Class ScheduledUpdateTypeForm.
Namespace
Drupal\scheduled_updates\FormCode
protected function entityTypeOptions() {
$options[''] = '';
foreach ($this->entityTypeManager
->getDefinitions() as $entity_id => $entityTypeInterface) {
if ($entity_id == 'scheduled_update') {
// Don't allow updating of updates! Inception!
continue;
}
if (is_subclass_of($entityTypeInterface
->getClass(), 'Drupal\\Core\\Entity\\ContentEntityInterface')) {
$options[$entity_id] = $entityTypeInterface
->getLabel();
}
}
return $options;
}