public function CommentStorage::getUnapprovedCount in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::getUnapprovedCount()
- 9 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::getUnapprovedCount()
Returns the number of unapproved comments.
Return value
int The number of unapproved comments.
Overrides CommentStorageInterface::getUnapprovedCount
File
- core/
modules/ comment/ src/ CommentStorage.php, line 341
Class
- CommentStorage
- Defines the storage handler class for comments.
Namespace
Drupal\commentCode
public function getUnapprovedCount() {
return $this->database
->select($this
->getDataTable(), 'c')
->condition('status', CommentInterface::NOT_PUBLISHED, '=')
->condition('default_langcode', 1)
->countQuery()
->execute()
->fetchField();
}