I have an entity and when I try to pass the whole entity object, only the name is passed through the routing.
Here is the relevant code in routing.yml:
mymodule.myentity_info:
path: '/admin/config/mymodule/myentity/{myentity}/info'
defaults:
_content: '\Drupal\mymodule\Controller\MyModuleController::info'
_title: 'Myentity Info'
options:
parameters:
myentity:
type: entity:myentity
requirements:
_entity_create_access: 'mymodule_myentity'
After clicking the link, I get this error: Trying to get property of non-object
I've added an issue regarding this to my sandbox project: https://www.drupal.org/node/2301021
type
not being indented correctly under the parameters?print_r($myentity)
. It just displays the name of that entity I added in string. Is there any example which I could refer to maybe?options:
andparameters:
keys doesn't appear anywhere in google search results, or like drupal.org/node/2192175 or a change record i can find :(info($myentity)
function should take the argument as the Entity object, but all it does is take just the name.