private static function drupalchatController::_drupalchat_get_groups in DrupalChat 8
Returns the groups to be used for filtering users
1 call to drupalchatController::_drupalchat_get_groups()
- drupalchatController::_drupalchat_get_user_details in src/
Controller/ drupalchatController.php
File
- src/
Controller/ drupalchatController.php, line 802 - Contains Drupal\drupalchat\Controller\drupalchatController
Class
Namespace
Drupal\drupalchat\ControllerCode
private static function _drupalchat_get_groups($uid) {
$groups = array();
if (function_exists('og_get_groups_by_user')) {
$og_groups = og_get_groups_by_user();
if (isset($og_groups['node'])) {
$groups = $og_groups['node'];
}
}
//hook to filter groups
\Drupal::moduleHandler()
->alter('drupalchat_get_groups', $groups, $uid);
return $groups;
}