public function YamlForm::hasSubmissions in YAML Form 8
Checks if a form has submissions.
Return value
bool TRUE if the form has submissions.
Overrides YamlFormInterface::hasSubmissions
File
- src/
Entity/ YamlForm.php, line 331
Class
- YamlForm
- Defines the form entity.
Namespace
Drupal\yamlform\EntityCode
public function hasSubmissions() {
/** @var \Drupal\yamlform\YamlFormSubmissionStorageInterface $submission_storage */
$submission_storage = \Drupal::entityTypeManager()
->getStorage('yamlform_submission');
return $submission_storage
->getTotal($this) ? TRUE : FALSE;
}