protected function GroupRevisionCheck::countDefaultLanguageRevisions in Group 2.0.x
Same name and namespace in other branches
- 8 src/Entity/Access/GroupRevisionCheck.php \Drupal\group\Entity\Access\GroupRevisionCheck::countDefaultLanguageRevisions()
Counts the number of revisions in the default language.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group.
Return value
int The number of revisions in the default language.
1 call to GroupRevisionCheck::countDefaultLanguageRevisions()
- GroupRevisionCheck::checkAccess in src/
Entity/ Access/ GroupRevisionCheck.php - Checks group revision access.
File
- src/
Entity/ Access/ GroupRevisionCheck.php, line 168
Class
- GroupRevisionCheck
- Checks access to a group revision.
Namespace
Drupal\group\Entity\AccessCode
protected function countDefaultLanguageRevisions(GroupInterface $group) {
return (int) $this->entityTypeManager
->getStorage('group')
->getQuery()
->allRevisions()
->accessCheck(FALSE)
->condition('id', $group
->id())
->condition('default_langcode', 1)
->count()
->execute();
}