interface WebformRequestInterface in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformRequestInterface.php \Drupal\webform\WebformRequestInterface
Provides an interface defining a webform request handler.
Hierarchy
- interface \Drupal\webform\WebformRequestInterface
Expanded class hierarchy of WebformRequestInterface
All classes that implement WebformRequestInterface
22 files declare their use of WebformRequestInterface
- WebformBreadcrumbBuilder.php in src/
Breadcrumb/ WebformBreadcrumbBuilder.php - WebformDevelSubmissionApiForm.php in modules/
webform_devel/ src/ Form/ WebformDevelSubmissionApiForm.php - WebformEntityController.php in src/
Controller/ WebformEntityController.php - WebformEntityReferenceEntityFormatter.php in src/
Plugin/ Field/ FieldFormatter/ WebformEntityReferenceEntityFormatter.php - WebformGroupManager.php in modules/
webform_group/ src/ WebformGroupManager.php
File
- src/
WebformRequestInterface.php, line 10
Namespace
Drupal\webformView source
interface WebformRequestInterface {
/**
* Determine if the current request is a webform admin route.
*
* @return bool
* TRUE if the current request is a webform admin route.
*/
public function isWebformAdminRoute();
/**
* Get the current request's source entity.
*
* @param string|array $ignored_types
* (optional) Array of ignore entity types.
*
* @return \Drupal\Core\Entity\EntityInterface|null
* The current request's source entity.
*/
public function getCurrentSourceEntity($ignored_types = NULL);
/**
* Get webform associated with the current request.
*
* @return \Drupal\webform\WebformInterface|null
* The current request's webform.
*/
public function getCurrentWebform();
/**
* Get webform submission associated with the current request.
*
* @return \Drupal\webform\WebformSubmissionInterface|null
* The current request's webform submission.
*/
public function getCurrentWebformSubmission();
/**
* Get the URL for the current webform and source entity.
*
* @param string $route_name
* The route name.
* @param array $route_options
* The route options.
*
* @return \Drupal\Core\Url
* The URL for a form/submission and source entity.
*/
public function getCurrentWebformUrl($route_name, array $route_options = []);
/**
* Get the URL for the current webform submission and source entity.
*
* @param string $route_name
* The route name.
* @param array $route_options
* The route options.
*
* @return \Drupal\Core\Url
* The URL for a form/submission and source entity.
*/
public function getCurrentWebformSubmissionUrl($route_name, array $route_options = []);
/**
* Get the webform and source entity for the current request.
*
* @return array
* An array containing the webform and source entity for the current
* request.
*/
public function getWebformEntities();
/**
* Get the webform submission and source entity for the current request.
*
* @return array
* An array containing the webform and source entity for the current
* request.
*/
public function getWebformSubmissionEntities();
/**
* Determine if the current request is an Ajax request.
*
* @return bool
* TRUE if the current request is an Ajax request.
*/
public function isAjax();
/**
* Get the URL for a form/submission and source entity.
*
* @param \Drupal\Core\Entity\EntityInterface $webform_entity
* A webform or webform submission.
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
* @param string $route_name
* The route name.
* @param array $route_options
* The route options.
*
* @return \Drupal\Core\Url
* The URL for a form/submission and source entity.
*/
public function getUrl(EntityInterface $webform_entity, EntityInterface $source_entity = NULL, $route_name, array $route_options = []);
/**
* Get the route name for a form/submission and source entity.
*
* @param \Drupal\Core\Entity\EntityInterface $webform_entity
* A webform or webform submission.
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
* @param string $route_name
* The route name.
*
* @return string
* A route name prefixed with 'entity.{entity_type_id}'
* or just 'entity'.
*/
public function getRouteName(EntityInterface $webform_entity, EntityInterface $source_entity = NULL, $route_name);
/**
* Get the route parameters for a form/submission and source entity.
*
* @param \Drupal\Core\Entity\EntityInterface $webform_entity
* A webform or webform submission.
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
*
* @return array
* An array of route parameters.
*/
public function getRouteParameters(EntityInterface $webform_entity, EntityInterface $source_entity = NULL);
/**
* Get the base route name for a form/submission and source entity.
*
* @param \Drupal\Core\Entity\EntityInterface $webform_entity
* A webform or webform submission.
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
*
* @return string
* If the source entity has a webform attached, 'entity.{entity_type_id}'
* or just 'entity'.
*/
public function getBaseRouteName(EntityInterface $webform_entity, EntityInterface $source_entity = NULL);
/**
* Check if a source entity has dedicate webform routes.
*
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
*
* @return bool
* TRUE if a source entity has dedicate webform routes.
*/
public function hasSourceEntityWebformRoutes(EntityInterface $source_entity = NULL);
/**
* Check if a source entity is attached to a webform.
*
* @param \Drupal\Core\Entity\EntityInterface $webform_entity
* A webform or webform submission.
* @param \Drupal\Core\Entity\EntityInterface|null $source_entity
* A webform submission's source entity.
*
* @return bool
* TRUE if a webform is attached to a webform submission source entity.
*/
public function isValidSourceEntity(EntityInterface $webform_entity, EntityInterface $source_entity = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformRequestInterface:: |
public | function | Get the base route name for a form/submission and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the current request's source entity. | 1 |
WebformRequestInterface:: |
public | function | Get webform associated with the current request. | 1 |
WebformRequestInterface:: |
public | function | Get webform submission associated with the current request. | 1 |
WebformRequestInterface:: |
public | function | Get the URL for the current webform submission and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the URL for the current webform and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the route name for a form/submission and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the route parameters for a form/submission and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the URL for a form/submission and source entity. | 1 |
WebformRequestInterface:: |
public | function | Get the webform and source entity for the current request. | 1 |
WebformRequestInterface:: |
public | function | Get the webform submission and source entity for the current request. | 1 |
WebformRequestInterface:: |
public | function | Check if a source entity has dedicate webform routes. | 1 |
WebformRequestInterface:: |
public | function | Determine if the current request is an Ajax request. | 1 |
WebformRequestInterface:: |
public | function | Check if a source entity is attached to a webform. | 1 |
WebformRequestInterface:: |
public | function | Determine if the current request is a webform admin route. | 1 |