public function MongodbShortcutSetStorage::countAssignedUsers in MongoDB 8
Get the number of users who have this set assigned to them.
Parameters
\Drupal\shortcut\ShortcutSetInterface $shortcut_set: The shortcut to count the users assigned to.
Return value
int The number of users who have this set assigned to them.
Overrides ShortcutSetStorageInterface::countAssignedUsers
File
- mongodb_shortcut/
src/ MongodbShortcutSetStorage.php, line 113 - Contains \Drupal\mongodb_shortcut\MongodbShortcutSetStorage.
Class
Namespace
Drupal\mongodb_shortcutCode
public function countAssignedUsers(ShortcutSetInterface $shortcut_set) {
return $this->mongo
->get('shortcut_set_users')
->count([
'set_name' => $shortcut_set
->id(),
]);
}