To get settings of an Entity field in Drupal 8
Use this code:
Use this code:
$entity_type='node'; $bundle='article'; $field_name='field_summary_image'; $bundle_fields = \Drupal::getContainer()->get('entity_field.manager')->getFieldDefinitions($entity_type, $bundle); $field_definition = $bundle_fields[$field_name]; $file_directory= $field_definition->getSetting('file_directory');
Comments
Post a Comment