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(
'EntityType' => '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 \Drupal::typedData()->create() the follow keys are supported:
array(
'value' => array(
'Length' => array(
'max' => 128,
),
),
);
Drupal\Core\TypedData\TypedDataManager::create()
public function getFieldDefinitions(array $constraints);