Get all fields defined in a bundle
EntityManager is deprecated moving forward.  The following can be used instead:
$entityFieldManager = \Drupal::service('entity_field.manager');
$fields = $entityFieldManager-&gt;getFieldDefinitions($entity_type, $bundle);

Whereas $entity_type can be 'node' and $bundle can be 'article'