protected function WebformSubmissionForm::isWebformEntityReferenceFromSourceEntity in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::isWebformEntityReferenceFromSourceEntity()
Is the current webform an entity reference from the source entity.
Return value
bool TRUE is the current webform an entity reference from the source entity.
File
- src/
WebformSubmissionForm.php, line 2930
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
protected function isWebformEntityReferenceFromSourceEntity() {
if (!$this->sourceEntity) {
return FALSE;
}
$webform = $this->webformEntityReferenceManager
->getWebform($this->sourceEntity);
if (!$webform) {
return FALSE;
}
return $webform
->id() === $this
->getWebform()
->id() ? TRUE : FALSE;
}