public function WebformRequest::getCurrentSourceEntity in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformRequest.php \Drupal\webform\WebformRequest::getCurrentSourceEntity()
Get the current request's source entity.
Parameters
string|array $ignored_types: (optional) Array of ignore entity types.
Return value
\Drupal\Core\Entity\EntityInterface|null The current request's source entity.
Overrides WebformRequestInterface::getCurrentSourceEntity
5 calls to WebformRequest::getCurrentSourceEntity()
- WebformRequest::getCurrentWebform in src/
WebformRequest.php - Get webform associated with the current request.
- WebformRequest::getCurrentWebformSubmissionUrl in src/
WebformRequest.php - Get the URL for the current webform submission and source entity.
- WebformRequest::getCurrentWebformUrl in src/
WebformRequest.php - Get the URL for the current webform and source entity.
- WebformRequest::getWebformEntities in src/
WebformRequest.php - Get the webform and source entity for the current request.
- WebformRequest::getWebformSubmissionEntities in src/
WebformRequest.php - Get the webform submission and source entity for the current request.
File
- src/
WebformRequest.php, line 143
Class
- WebformRequest
- Handles webform requests.
Namespace
Drupal\webformCode
public function getCurrentSourceEntity($ignored_types = NULL) {
// TODO: Can we refactor this method away altogether and let all its callers
// work directly with webform source entity manager?
return $this->webformSourceEntityManager
->getSourceEntity(is_null($ignored_types) ? [] : $ignored_types);
}