public function WebformRequest::getRouteName in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformRequest.php \Drupal\webform\WebformRequest::getRouteName()
Get the route name for a form/submission and source entity.
Parameters
\Drupal\Core\Entity\EntityInterface $webform_entity: A webform or webform submission.
\Drupal\Core\Entity\EntityInterface|null $source_entity: A webform submission's source entity.
string $route_name: The route name.
Return value
string A route name prefixed with 'entity.{entity_type_id}' or just 'entity'.
Overrides WebformRequestInterface::getRouteName
1 call to WebformRequest::getRouteName()
- WebformRequest::getUrl in src/
WebformRequest.php - Get the URL for a form/submission and source entity.
File
- src/
WebformRequest.php, line 238
Class
- WebformRequest
- Handles webform requests.
Namespace
Drupal\webformCode
public function getRouteName(EntityInterface $webform_entity, EntityInterface $source_entity = NULL, $route_name) {
if (!$this
->hasSourceEntityWebformRoutes($source_entity)) {
$source_entity = NULL;
}
return $this
->getBaseRouteName($webform_entity, $source_entity) . '.' . $route_name;
}