public function MapperHelper::findParagraphsFields in Feeds Paragraphs 8
File
- src/
Utility/ MapperHelper.php, line 43
Class
Namespace
Drupal\feeds_para_mapper\UtilityCode
public function findParagraphsFields($entity_type, $bundle) {
$fieldManager = \Drupal::service('entity_field.manager');
$entityFields = $fieldManager
->getFieldDefinitions($entity_type, $bundle);
$entityFields = array_filter($entityFields, function ($item) {
return $item instanceof FieldConfigInterface;
});
$fields = array();
foreach ($entityFields as $field) {
if ($field
->getType() === 'entity_reference_revisions') {
$fields[] = $field;
}
}
return $fields;
}