You are here

protected function FieldUtilsTrait::getEntityDestinationOptions in Scheduled Updates 8

1 call to FieldUtilsTrait::getEntityDestinationOptions()
ScheduledUpdateTypeBaseForm::createCloneFieldSelect in src/Form/ScheduledUpdateTypeBaseForm.php
Create an option to select one field to clone on type add form.

File

src/FieldUtilsTrait.php, line 69
Contains \Drupal\scheduled_updates\FieldUtilsTrait.

Class

FieldUtilsTrait

Namespace

Drupal\scheduled_updates

Code

protected function getEntityDestinationOptions($entity_type_id) {
  $definitions = $this
    ->getDestinationFields($entity_type_id);
  $options = [];
  foreach ($definitions as $definition) {
    $options[$definition
      ->getName()] = $definition
      ->getLabel();
  }
  return $options;
}