public function FlaggingCollectionStorage::countDefaultLanguageRevisions in Flag Lists 8
Same name and namespace in other branches
- 4.0.x src/FlaggingCollectionStorage.php \Drupal\flag_lists\FlaggingCollectionStorage::countDefaultLanguageRevisions()
Counts the number of revisions in the default language.
Parameters
\Drupal\flag_lists\Entity\FlaggingCollectionInterface $entity: The Flagging collection entity.
Return value
int The number of revisions in the default language.
Overrides FlaggingCollectionStorageInterface::countDefaultLanguageRevisions
File
- src/
FlaggingCollectionStorage.php, line 43
Class
- FlaggingCollectionStorage
- Defines the storage handler class for Flagging collection entities.
Namespace
Drupal\flag_listsCode
public function countDefaultLanguageRevisions(FlaggingCollectionInterface $entity) {
return $this->database
->query('SELECT COUNT(*) FROM {flagging_collection_field_revision} WHERE id = :id AND default_langcode = 1', [
':id' => $entity
->id(),
])
->fetchField();
}