public function FieldHelper::getFieldDefinitions in Feeds Paragraphs 8
File
- tests/
src/ Unit/ Helpers/ FieldHelper.php, line 163
Class
Namespace
Drupal\Tests\feeds_para_mapper\Unit\HelpersCode
public function getFieldDefinitions($entity_type, $bundle) {
$result = null;
switch ($entity_type) {
case "paragraph":
$result = $this
->getBundleFields($bundle);
break;
case "node":
$result = array(
$this->fields[0],
);
break;
}
if (isset($result)) {
$fields = array();
foreach ($result as $field) {
$name = $field
->reveal()
->getName();
$fields[$name] = $field;
}
return $fields;
}
return null;
}