protected function WebformSubmissionForm::getLimitSourceEntity in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::getLimitSourceEntity()
Get source entity for use with entity limit total and user submissions.
Return value
\Drupal\Core\Entity\EntityInterface|null The webform submission's source entity.
2 calls to WebformSubmissionForm::getLimitSourceEntity()
- WebformSubmissionForm::checkTotalLimit in src/
WebformSubmissionForm.php - Check webform submission total limits.
- WebformSubmissionForm::checkUserLimit in src/
WebformSubmissionForm.php - Check webform submission user limit.
File
- src/
WebformSubmissionForm.php, line 3012
Class
- WebformSubmissionForm
- Provides a webform to collect and edit submissions.
Namespace
Drupal\webformCode
protected function getLimitSourceEntity() {
/** @var \Drupal\webform\WebformSubmissionInterface $webform_submission */
$webform_submission = $this
->getEntity();
$source_entity = $webform_submission
->getSourceEntity();
if ($source_entity && $source_entity
->getEntityTypeId() !== 'webform') {
return $source_entity;
}
return NULL;
}