Get the groups of admins that will be used to display the
admin menu on the side.

@return array
331168
public function getDashboardNavigationGroups()
    {
        $groups = $this->getDashboardGroups();

        $menuGroups = $this->getContainer()->getParameter('networking_init_cms.admin_menu_groups');

        foreach ($menuGroups as $key => $menuGroup) {
            foreach ($menuGroup['items'] as $k => $item) {
                if (array_key_exists($item, $groups)) {
                    $menuGroups[$key]['sub_group'][$k] = $groups[$item];
                }
            }
        }

        return $menuGroups;
    }
1302438
protected static function getRulesGroups()
    {
        $groups = [];

        foreach (get_class_vars(get_called_class()) as $property => $val) {
            if (preg_match('/^.*rules$/i', $property)) {
                $groups[] = $property;
            }
        }

        return $groups;
    }
809119
public function groupList() {
    $groups = self::loadGroups(true);
    $groups = self::parseGroupsForListing($groups);
    $user = \Drupal::currentUser();
    $user = User::load($user->id());
    $user_groups = Group::getUserGroup($user);
    if ($user_groups && count($user_groups) > 0) {
      $user_groups = self::parseGroupsForListing($user_groups);
    } else {
      $user_groups = [];
    }
    return [
      '#theme' => 'group-list',
      '#groups' => $groups,
      '#user_groups' => $user_groups,
      '#cache' => [
        'contexts' => ['user'],
        'tags' => ['user:'.$user->id(), 'groups'],
        'max-age' => '120',
      ],
    ];
  }
902613
public function pages()
    {
        $links[] = [__d('me_cms', 'List pages'), [
            'controller' => 'Pages',
            'action' => 'index',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        //Only admins and managers can access these actions
        if ($this->Auth->isGroup(['admin', 'manager'])) {
            $links[] = [__d('me_cms', 'Add page'), [
                'controller' => 'Pages',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'List categories'), [
                'controller' => 'PagesCategories',
                'action' => 'index',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
            $links[] = [__d('me_cms', 'Add category'), [
                'controller' => 'PagesCategories',
                'action' => 'add',
                'plugin' => 'MeCms',
                'prefix' => ADMIN_PREFIX,
            ]];
        }

        $links[] = [__d('me_cms', 'List static pages'), [
            'controller' => 'Pages',
            'action' => 'indexStatics',
            'plugin' => 'MeCms',
            'prefix' => ADMIN_PREFIX,
        ]];

        return [$links, I18N_PAGES, ['icon' => 'far copy']];
    }
1318042
public function getGroups()
    {
        $groups = array();
        foreach ($this->graph->getVertices() as $vertex) {
            $groups[$vertex->getGroup()] = true;
        }

        return array_keys($groups);
    }
1146011
public function groups()
    {
        if (empty($this->_compiledGroupNames)) {
            foreach ($this->_config['groups'] as $group) {
                $this->_compiledGroupNames[] = $this->_config['prefix'] . $group;
            }
        }

        $groups = wincache_ucache_get($this->_compiledGroupNames);
        if (count($groups) !== count($this->_config['groups'])) {
            foreach ($this->_compiledGroupNames as $group) {
                if (!isset($groups[$group])) {
                    wincache_ucache_set($group, 1);
                    $groups[$group] = 1;
                }
            }
            ksort($groups);
        }

        $result = [];
        $groups = array_values($groups);
        foreach ($this->_config['groups'] as $i => $group) {
            $result[] = $group . $groups[$i];
        }

        return $result;
    }
811166
protected function getVisitorCategoriesByUsergroups()
	{
	    $arrVisitorCats = array();
	    $objVisitorCat = \Database::getInstance()
                            ->prepare("SELECT
                                            `id`
                                          , `title`
                                          , `visitors_stat_protected`
                                          , `visitors_stat_groups`
                                       FROM
                                            tl_visitors_category
                                        WHERE 1
                                        ORDER BY
                                            title
                                        ")
                            ->execute();
	    while ($objVisitorCat->next())
	    {
	        if ( true === $this->isUserInVisitorStatGroups($objVisitorCat->visitors_stat_groups,
                                                    (bool) $objVisitorCat->visitors_stat_protected) )
	        {
	            $arrVisitorCats[] = array
	            (
	                'id'    => $objVisitorCat->id,
	                'title' => $objVisitorCat->title
	            );
	        }
	    }
	
	    if (0 == count($arrVisitorCats))
	    {
	        $arrVisitorCats[] = array('id' => '0', 'title' => '---------');
	    }
	    return $arrVisitorCats;
	}
1329744
protected function GetAdminGroups($group = "")
	{
		$keys = array_keys($this->GetAdminModulesList());
		if ($group != "")
		{
			if (in_array($group, $keys))
			{
				$keys = array($group);
			}
			else
			{
				$keys = array();
			}
		}
		
		$arr = new ArrayDataset($keys, "name");
		return $arr->getIterator();
	}
1178359
public function showComponentGroups()
    {
        $this->subMenu['groups']['active'] = true;

        return View::make('dashboard.components.groups.index')
            ->withPageTitle(trans_choice('dashboard.components.groups.groups', 2).' - '.trans('dashboard.dashboard'))
            ->withGroups(ComponentGroup::orderBy('order')->get())
            ->withSubMenu($this->subMenu);
    }
202210
public function getGroupIds()
    {
        $groups = $this->groups;

        $groupIds = array();
        if (count($groups) > 0) {
            /* @var $group GroupInterface */
            foreach ($groups as $group) {
                $groupIds[] = $group->getId();
            }
        }

        return $groupIds;
    }
88508
public function get_all_groups() {
        if ($this->_groups === null) {
            $this->_groups = groups_get_all_groups($this->course->id);
            foreach ($this->_groups as $gid=>$group) {
                $this->_groups[$gid]->name = format_string($group->name);
            }
        }
        return $this->_groups;
    }
605729
public function getTrackDisplayGroups()
    {
        return array(
            'tracks'      => $this->translate->_('Tracks'),
            'respondents' => $this->translate->_('Respondent'),
            'staff'       => $this->translate->_('Staff'),
        );
    }
390806
public function getGroups()
	{
		if ( ! $this->userGroups)
		{
			$this->userGroups = $this->groups->find_all();
		}

		return $this->userGroups;
	}
1331847
public function getAdminCanditates()
    {
        $viewer = get_viewer();
        $query = $this->getService('repos:people.person')->getQuery();

        //super admin can make anyone admin
        if (!$viewer->admin()) {
            $ids = $this->_mixer->followerIds->toArray();
            $ids = array_merge($ids, $viewer->followerIds->toArray());
            $query->id($ids)->id($viewer->id, '<>')->id($this->administratorIds->toArray(), '<>');
        }

        return $query->toEntitySet();
    }
331832
public function getItems()
    {
        $manager = Configs::authManager();
        $available = [];
        foreach (array_keys($manager->getRoles()) as $name) {
            $available[$name] = 'role';
        }

        foreach (array_keys($manager->getPermissions()) as $name) {
            if ($name[0] != '/') {
                $available[$name] = 'permission';
            }
        }

        $assigned = [];
        foreach ($manager->getAssignments($this->id) as $item) {
            $assigned[$item->roleName] = $available[$item->roleName];
            unset($available[$item->roleName]);
        }

        return [
            'available' => $available,
            'assigned' => $assigned,
        ];
    }
959106
public function getAssignedMembers()
    {
        $list   = new ArrayList();
        $groups = $this->Groups();

        $list->merge($this->Users());

        foreach ($groups as $group) {
            $list->merge($group->Members());
        }

        $list->removeDuplicates();
        return $list;
    }
478867
public function getAdmins()
    {
        $admins = $this->security->getAdmins();
        if (!empty($admins)) {
            if (!$this->security->checkAdmin()) {
                $this->setAdminHeaders();
            }
        }
        $this->parseAdmins($admins);
        return $admins;
    }