December 2016
Beginner to intermediate
1005 pages
21h 54m
English
Entities can implement a route provider that will create the route definitions for the entity's canonical (view), edit, and delete routes. As of Drupal 8.0.1, the add path for an entity is not handled through the default route provider.
In this recipe, we will extend the default \Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider and provide the add routes for our entity.
You will need a custom module to place the code into in order to implement a configuration entity type. Create an src directory for your classes. A custom content entity type needs to be implemented, such as the one in the Creating a content entity type recipe.
MessageHtmlRouteProvider class in the src directory that ...Read now
Unlock full access