public function WebformEntityStorage::setNextSerial in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityStorage.php \Drupal\webform\WebformEntityStorage::setNextSerial()
Set the next serial number.
Parameters
\Drupal\webform\WebformInterface $webform: A webform.
int $next_serial: The next serial number.
Overrides WebformEntityStorageInterface::setNextSerial
File
- src/
WebformEntityStorage.php, line 229
Class
- WebformEntityStorage
- Storage controller class for "webform" configuration entities.
Namespace
Drupal\webformCode
public function setNextSerial(WebformInterface $webform, $next_serial = 1) {
$this->database
->update('webform')
->fields([
'next_serial' => $next_serial,
])
->condition('webform_id', $webform
->id())
->execute();
}