By editor, 10 January, 2017 Question How to get Entity type data and metadata Get entity types list : $itmes_list= \Drupal::entityTypeManager()->getDefinitions(); Get Entity type (Content / Config) $itmes_list['node']->getGroup(); $itmes_list['node_type']->getGroup(); Get Label / Name $itmes_list['node']->getLabel(); Load entity (dynamic type) from database \Drupal::entityTypeManager()->getStorage($entity_type)->load($id); See : https://api.drupal.org/api/drupal/core%21includes%21entity.inc/function/entity_load/8.3.x Load a entity type using entityTypeManager Example : $nodeEntity = \Drupal::entityTypeManager()->getDefinition('node'); Tags Drupal 8 Code Entity Find Entity using Drupal EntityQuery Find Entity using Drupal EntityQuery Comments You must have JavaScript enabled to use this form. Your name Subject Comment About text formats Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically.
Comments