I want to create programmable content (user content created using the admin user interface). But before creating, I want to programmatically check the field types of my custom content
My custom content contains a body field (type text), a description field (text type), an int field (int type), a file attachment field (fid type?) ...
I am testing several ways with the new Drupal 8 api, my last attempt.
$entity_object = NodeType::load("my_custom_content");
dpm($entity_object);
$test = \Drupal::getContainer()->get("entity_field.manager")->getFieldDefinitions("my_custom_content",$entity_object->bundle())
With this $ entity_object, how can I get a list of fields of my custom content? I see the EntityFieldManager class, the FieldItemList class ... But I still don't understand how to play with drupal 8 / class / poo ...: /
Thanks!