You are here

protected function FieldUtilsTrait::getSourceFields in Scheduled Updates 8

Parameters

\Drupal\scheduled_updates\ScheduledUpdateTypeInterface $updateType:

Return value

FieldConfig[] array

1 call to FieldUtilsTrait::getSourceFields()
ScheduledUpdateTypeForm::createFieldMapElements in src/Form/ScheduledUpdateTypeForm.php
Create form elements to update field map.

File

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

Class

FieldUtilsTrait

Namespace

Drupal\scheduled_updates

Code

protected function getSourceFields(ScheduledUpdateTypeInterface $updateType) {
  $source_fields = [];
  $fields = $this
    ->FieldManager()
    ->getFieldDefinitions('scheduled_update', $updateType
    ->id());
  foreach ($fields as $field_id => $field) {
    if (!$field instanceof BaseFieldDefinition) {
      $source_fields[$field_id] = $field;
    }
  }
  return $source_fields;
}