public function WebformRevisionsRequest::hasSourceEntityWebformRoutes in Config Entity Revisions 8
Same name and namespace in other branches
- 8.2 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::hasSourceEntityWebformRoutes()
- 1.x modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::hasSourceEntityWebformRoutes()
Check if a source entity has dedicate webform routes.
Parameters
\Drupal\Core\Entity\EntityInterface|null $source_entity: A webform submission's source entity.
Return value
bool TRUE if a source entity has dedicate webform routes.
Overrides WebformRequest::hasSourceEntityWebformRoutes
2 calls to WebformRevisionsRequest::hasSourceEntityWebformRoutes()
- WebformRevisionsRequest::getRouteName in modules/
webform_revisions/ src/ WebformRevisionsRequest.php - Get the route name for a form/submission and source entity.
- WebformRevisionsRequest::getRouteParameters in modules/
webform_revisions/ src/ WebformRevisionsRequest.php - Get the route parameters for a form/submission and source entity.
File
- modules/
webform_revisions/ src/ WebformRevisionsRequest.php, line 311
Class
- WebformRevisionsRequest
- Handles webform requests.
Namespace
Drupal\webform_revisionsCode
public function hasSourceEntityWebformRoutes(EntityInterface $source_entity = NULL) {
if ($source_entity && $this
->routeExists('entity.' . $source_entity
->getEntityTypeId() . '.webform_submission.canonical')) {
return TRUE;
}
else {
return FALSE;
}
}