Last active
May 25, 2017 15:21
-
-
Save sumanthkumarc/4d770a680fbb8d15bce336cd2b2ba6cb to your computer and use it in GitHub Desktop.
Entity id passed as slug, not loaded as entity in routematch Drupal 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #When a slug passed in route doesn't load entity on getParameter, you need to pass the entity type as options | |
| #in routing.yml so that the entityconverter knows what it is. | |
| #@link https://www.drupal.org/docs/8/api/routing-system/how-a-node-id-gets-converted-to-its-actual-node-object | |
| #in your routing.yml | |
| route_name: | |
| path: /path/{foo} | |
| options: | |
| parameters: | |
| foo: | |
| type: entity:foo_entity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment