Skip to content
Snippets Groups Projects
Commit e46cfdec authored by Aaron Bauman's avatar Aaron Bauman
Browse files

Issue #3269666 by altcom_neil, gcb: Salesforce Mapped Objects local task not...

Issue #3269666 by altcom_neil, gcb: Salesforce Mapped Objects local task not appearing on Webform Submission pages
parent 2a3ed468
No related branches found
No related tags found
No related merge requests found
Pipeline #451444 canceled
......@@ -44,8 +44,14 @@ class MappedObjectController extends ControllerBase {
return AccessResult::forbidden();
}
// There must be a better way to get the entity from a route match.
$param = current($this->route->getParameters()->all());
$param = null;
$parameter_info = $this->route->getRouteObject()->getOption('parameters');
foreach ($parameter_info as $name => $options) {
if (isset($options['type']) && str_starts_with($options['type'], 'entity:')) {
$param = $this->route->getParameter($name);
continue 1;
}
}
if (!is_object($param)) {
return AccessResult::forbidden();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment