protected function YamlFormSubmissionStorage::getNextSerial in YAML Form 8
Returns the next serial number.
Return value
int The next serial number.
1 call to YamlFormSubmissionStorage::getNextSerial()
- YamlFormSubmissionStorage::doSave in src/
YamlFormSubmissionStorage.php - Performs storage-specific saving of the entity.
File
- src/
YamlFormSubmissionStorage.php, line 559
Class
- YamlFormSubmissionStorage
- Defines the form submission storage.
Namespace
Drupal\yamlformCode
protected function getNextSerial(YamlFormSubmissionInterface $yamlform_submission) {
$yamlform = $yamlform_submission
->getYamlForm();
$next_serial = $yamlform
->getState('next_serial');
$max_serial = $this
->getMaxSerial($yamlform);
$serial = max($next_serial, $max_serial);
$yamlform
->setState('next_serial', $serial + 1);
return $serial;
}