protected function ContentEntityAutosaveFormTestBase::getCountAutosaveSessionEntries in Autosave Form 8
Gets the count of autosave unique session entries.
Return value
int The count of autosave unique session entries.
File
- tests/
src/ FunctionalJavascript/ ContentEntity/ ContentEntityAutosaveFormTestBase.php, line 580
Class
- ContentEntityAutosaveFormTestBase
- Base test class for testing autosave support for entity forms.
Namespace
Drupal\Tests\autosave_form\FunctionalJavascript\ContentEntityCode
protected function getCountAutosaveSessionEntries() {
$count = \Drupal::database()
->select(AutosaveEntityFormStorageInterface::AUTOSAVE_ENTITY_FORM_TABLE)
->groupBy('form_session_id')
->countQuery()
->execute()
->fetchField();
return $count !== FALSE ? $count : 0;
}