protected function YamlFormSubmissionForm::getLimitSourceEntity in YAML Form 8
Get source entity for use with entity limit total and user submissions.
Return value
\Drupal\Core\Entity\EntityInterface|null The form submission's source entity.
2 calls to YamlFormSubmissionForm::getLimitSourceEntity()
- YamlFormSubmissionForm::checkTotalLimit in src/
YamlFormSubmissionForm.php - Check form submission total limits.
- YamlFormSubmissionForm::checkUserLimit in src/
YamlFormSubmissionForm.php - Check form submission user limit.
File
- src/
YamlFormSubmissionForm.php, line 1440
Class
- YamlFormSubmissionForm
- Provides a form to collect and edit submissions.
Namespace
Drupal\yamlformCode
protected function getLimitSourceEntity() {
/** @var \Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission */
$yamlform_submission = $this
->getEntity();
$source_entity = $yamlform_submission
->getSourceEntity();
if ($source_entity && $source_entity
->getEntityTypeId() != 'yamlform') {
return $source_entity;
}
return NULL;
}