You are here

public function WebformEntityStorage::setNextSerial in Webform 8.5

Same name and namespace in other branches
  1. 6.x 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 270

Class

WebformEntityStorage
Storage controller class for "webform" configuration entities.

Namespace

Drupal\webform

Code

public function setNextSerial(WebformInterface $webform, $next_serial = 1) {
  $this->database
    ->update('webform')
    ->fields([
    'next_serial' => $next_serial,
  ])
    ->condition('webform_id', $webform
    ->id())
    ->execute();
}