public function Mapper::findParagraphsFields in Feeds Paragraphs 8
Parameters
string $entity_type:
string $bundle:
Return value
1 call to Mapper::findParagraphsFields()
- Mapper::getTargets in src/
Mapper.php
File
- src/
Mapper.php, line 80
Class
Namespace
Drupal\feeds_para_mapperCode
public function findParagraphsFields($entity_type, $bundle) {
$fields = array();
$entityFields = $this->entityFieldManager
->getFieldDefinitions($entity_type, $bundle);
if (!isset($entityFields)) {
return $fields;
}
$entityFields = array_filter($entityFields, function ($item) {
return $item instanceof FieldConfigInterface;
});
foreach ($entityFields as $field) {
if ($field
->getType() === 'entity_reference_revisions') {
$fields[] = $field;
}
}
return $fields;
}