title: Drupal 8, get programmatically the list of fields of a custom content
body: <p>I want create programmatically a custom content (custom content created via the admin UI). But, before the creation, I want check programmatically the types of fields of my custom content</p>
  
  <p>My custom content contains a field "body" (type text), a field "description" (type text), an int field (type int), an attached file field (type fid ?)...</p>
  
  <p>I test several ways with the new api of Drupal 8, my last try..</p>
  
  <pre><code>// I get the entity object "my_custom_content"
  $entity_object = NodeType::load("my_custom_content");
  dpm($entity_object); //Work perfectly
  
  
  $test = \Drupal::getContainer()-&gt;get("entity_field.manager")-&gt;getFieldDefinitions("my_custom_content",$entity_object-&gt;bundle())
  //The \Drupal::getConta... Return an error : The "my_custom_content" entity type does not exist.
  </code></pre>
  
  <p>With this $entity_object, how can I get the list of the fields of my custom content ? 
  I see the EntityFieldManager Class, the FieldItemList Class...But I still do not understand how to play with drupal 8 / class / poo ... :/</p>
  
  <p>Thanks ! </p>