Get the list of all content types
How do I get a list of all the content types defined in a Drupal 8 site?
In Drupal 7 it used to be node_type_get_types()
, but it has been deprecated.
I tried Entity::loadMultiple()
but it doesn’t seem to work. I was thinking about making a custom query, but I don’t know how it’s stored in the database.
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.