Skip to main content
Image
Code

Get complete list of Drupal entities

To get a complete list of the entities of a website built with Drupal we can do it in different ways. The fastest and easiest way is through Drush, click here to see how to install Drush on your website if you don't have it yet!

List of entities for Drupal 7

For Drupal 7 installations, run the following command with Drush via command prompt:

drush eval "print_r(array_keys(entity_get_info()));"

This command will return a complete listing of all entities in Drupal 7 versions.

 

List of entities for Drupal 7, Drupal 9 and Drupal 10

For Drupal 8, Drupal 9, Drupal 10 and higher installations, run the following command with Drush via command prompt:

drush eval "print_r(array_keys(\Drupal::entityTypeManager()->getDefinitions()));"

This command will return a complete listing of all entities in Drupal versions 8 and higher.

Join the Drupal Sapiens Community

Save content that interests you, connect with others in the community, contribute to win prizes and much more.

Login or create an account here

Latest posts

Featured

Last news