Links

Each entity type has a series of links the system needs to know about. Things like the canonical URL, the edit URL, the creation URL, and so on. For the node entities we have the following:

*   links = { 
*     "canonical" = "/node/{node}", 
*     "delete-form" = "/node/{node}/delete", 
*     "delete-multiple-form" = "/admin/content/node/delete", 
*     "edit-form" = "/node/{node}/edit", 
*     "version-history" = "/node/{node}/revisions", 
*     "revision" = "/node/{node}/revisions/{node_revision}/view", 
*     "create" = "/node", 
*   } 

Like the entity keys, these links are common across all entity types (depending on their enabled capabilities). For example, all entity types have a canonical URL and the API allows to quickly find out which one that is based on the definition.

One thing to note about these paths is that they need to be defined as routes. So, you can find them inside the node.routing.yml file (where you also find the routes used by the NodeType configuration entity type). Alternatively, though, these routes can be defined dynamically in order to prevent duplication. This can be done using a route provider handler. We will talk about handlers soon but also see a concrete example in the next chapter. In case you were wondering where the missing routes for the Node links are, check the NodeRouteProvider that registers them.