How to load entity by UUID from url argument?
Usually routes have {entity_type}
in their routes’s path and Drupal loads the entity by its ID.
I need to load entities by their UUID, so the path would look like /node/0ff3b31b-5abb-4377-bb00-af71882e38a4.
Is it possible to have a route that allows to load entities by their UUID? Do I need to create a ParamConverter
class for this?
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.