Gets an array of entity field definitions.
If a 'bundle' key is present in the given entity definition, fields specific to this bundle are included. Entity fields are always multi-valued, so 'list' is TRUE for each returned field definition.
array $constraints: An array of entity constraints as used for entities in typed data definitions, i.e. an array having an 'entity type' and optionally a 'bundle' key. For example:
array(
'entity type' => 'node',
'bundle' => 'article',
);
array An array of field definitions of entity fields, keyed by field name. In addition to the typed data definition keys as described at typed_data()->create() the follow keys are supported:
Drupal\Core\TypedData\TypedDataManager::create()
public function getFieldDefinitions(array $constraints);