Drupal 8 : Charger les configurations de champs

 

Charger la définition d"un champs :

$field = \Drupal::entityTypeManager()->getStorage('field_storage_config')->load('node.field_my_custom');

Charger les configurations d'un champs :

$field_instance = \Drupal::entityTypeManager()->getStorage('field_config')->load('node.bundle.field_my_custom');