You are here

public function WebformRevisionsRequest::getCurrentSourceEntity in Config Entity Revisions 8

Same name and namespace in other branches
  1. 8.2 modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::getCurrentSourceEntity()
  2. 1.x modules/webform_revisions/src/WebformRevisionsRequest.php \Drupal\webform_revisions\WebformRevisionsRequest::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 WebformRequest::getCurrentSourceEntity

3 calls to WebformRevisionsRequest::getCurrentSourceEntity()
WebformRevisionsRequest::getCurrentWebform in modules/webform_revisions/src/WebformRevisionsRequest.php
Get webform associated with the current request.
WebformRevisionsRequest::getWebformEntities in modules/webform_revisions/src/WebformRevisionsRequest.php
Get the webform and source entity for the current request.
WebformRevisionsRequest::getWebformSubmissionEntities in modules/webform_revisions/src/WebformRevisionsRequest.php
Get the webform submission and source entity for the current request.

File

modules/webform_revisions/src/WebformRevisionsRequest.php, line 153

Class

WebformRevisionsRequest
Handles webform requests.

Namespace

Drupal\webform_revisions

Code

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);
}