public function HeartbeatStreamStorage::countDefaultLanguageRevisions in Heartbeat 8
Counts the number of revisions in the default language.
Parameters
\Drupal\heartbeat\Entity\HeartbeatStreamInterface $entity: The Heartbeat stream entity.
Return value
int The number of revisions in the default language.
Overrides HeartbeatStreamStorageInterface::countDefaultLanguageRevisions
File
- src/
HeartbeatStreamStorage.php, line 43
Class
- HeartbeatStreamStorage
- Defines the storage handler class for Heartbeat stream entities.
Namespace
Drupal\heartbeatCode
public function countDefaultLanguageRevisions(HeartbeatStreamInterface $entity) {
return $this->database
->query('SELECT COUNT(*) FROM {heartbeat_stream_field_revision} WHERE id = :id AND default_langcode = 1', array(
':id' => $entity
->id(),
))
->fetchField();
}