protected function ContentEntityAutosaveFormTestBase::deleteAutosavedStates in Autosave Form 8
Deletes the autosaved states.
Parameters
$timestamps: (optional) If specified, only the autosaved states with the given timestamps will be deleted.
1 call to ContentEntityAutosaveFormTestBase::deleteAutosavedStates()
- ContentEntityAutosaveFormTestBase::doTestAutosaveFormExistingEntity in tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php - Tests the autosave support on entity forms.
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 617
Class
- ContentEntityAutosaveFormTestBase
- Base test class for testing autosave support for entity forms.
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityCode
protected function deleteAutosavedStates(array $timestamps = NULL) {
$query = \Drupal::database()
->delete(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE);
if (isset($timestamps)) {
$query
->condition('timestamp', $timestamps, 'IN');
}
$query
->execute();
}