Returns the languages list for all siteaccess unless it's the same for
each one, in this case, it returns the languages list for the group.

@param array $siteList
@param string $groupName

@return array
184880
protected function getLanguages(array $siteList, $groupName)
    {
        $result = [];
        $allSame = true;
        $previousSA = null;
        foreach ($siteList as $siteaccess) {
            $result[$siteaccess] = $this->getParameter(
                'RegionalSettings', 'SiteLanguageList', 'site.ini', $siteaccess
            );
            if ($allSame && $previousSA !== null) {
                $allSame = ($result[$previousSA] === $result[$siteaccess]);
            }
            $previousSA = $siteaccess;
        }
        if ($allSame) {
            return [$groupName => $result[$previousSA]];
        }

        return $result;
    }
506498
protected function _group()
    {
        $result = [];
        foreach ($this->_parts['group'] as $name => $value) {
            $result[] = $this->dialect()->name($name);
        }
        return $fields = join(', ', $result);
    }
604938
public function load($groupName)
    {
        if (! count($this->readers)) {
            throw new \RuntimeException('No config readers attached');
        }

        if (! $groupName) {
            throw new \InvalidArgumentException('No config group specified');
        }

        if (! is_string($groupName)) {
            throw new \InvalidArgumentException('Config group must be a string');
        }

        if (isset($this->groups[$groupName])) {
            return $this->groups[$groupName];
        }

        $config = [];

        foreach ($this->readers as $reader) {
            if ($groupConfig = $reader->load($groupName)) {
                $config = array_replace_recursive($config, $groupConfig);
            }
        }

        $this->groups[$groupName] = $config;

        return $this->groups[$groupName];
    }
769617
public function getGroupIdByName($name)
    {
        if (!isset($this->groups)) {
            $this->resetCraftSitesServiceGroupsCache();

            $this->groups = [];
            foreach (Craft::$app->sites->getAllGroups() as $group) {
                $this->groups[$group->name] = $group->id;
            }
        }
        if (!array_key_exists($name, $this->groups)) {
            $group = new SiteGroup(['name' => $name]);
            if (Craft::$app->sites->saveGroup($group)) {
                $this->groups[$name] = $group->id;
            } else {
                Schematic::importError($group, $name);

                return null;
            }
        }

        return $this->groups[$name];
    }
1086108
private function getAllLanguages(\DOMXPath $xpath)
    {
        $languages = [];

        foreach ($xpath->query('//*[@language]') as $currentNode) {
            $languages[] = $currentNode->getAttribute('language');
        }

        return array_unique($languages);
    }
471070
protected function loadLangList($locale, $group)
    {
        $translations = app('translator')->getLoader()->load($locale, $group);

        return Arr::dot([$group => $translations]);
    }
267977
public function getLanguagesAsHash($langlist,$name = true) {
		$hash = array();
		
		foreach ($langlist as $lang) {
			$hash[$lang['code']] = ($name)?$lang['name']:$lang['origname'];
		}
		
		return $hash;
	}
555294
public function addShopGroup($groupName, array $productIdList)
    {
        $result = $this->httpRaw(self::WECHAT_SHOP_GROUP_ADD_URL . 'access_token=' . $this->getAccessToken(), [
            'group_detail' => [
                'group_name' => $groupName,
                'product_list' => $productIdList
            ]
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success' ? $result['group_id'] : false;
    }
968644
public function groupAppend( $groupName, $groupName2OrArray , $replace = true ){
		$this->load($groupName);
		$data = [];
		if( is_array( $groupName2OrArray ) ){
			$data = $groupName2OrArray;
		}
		else{
			$this->load( $groupName2OrArray );
			$data = $this->langs[ $groupName2OrArray];
		}
		if( !empty( $data)){
			foreach ($data as $k => $v ){
				if( isset( $this->langs[$groupName][$k])){
					if( $replace == true ){
						$this->langs[ $groupName ][$k] = $v;
					}
				}
				else{
					$this->langs[ $groupName ][$k] = $v;
				}
				
			}
		}
		
	}
376185
public function getSiteGroups()
    {
        if(!isset($this->SiteGroups)){
            $this->setProperty("SiteGroups", new GroupCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"sitegroups")));
        }
        return $this->getProperty("SiteGroups");
    }
314397
protected function getGroups()
	{
		$groups = array();

		$select = new HtmlSelect;

		// Try to inject the text object into the field
		try
		{
			$select->setText($this->getText());
		}
		catch (\RuntimeException $exception)
		{
			// A Text object was not set, ignore the error and try to continue processing
		}

		// Get the list of time zones from the server.
		$zones = \DateTimeZone::listIdentifiers();

		// Build the group lists.
		foreach ($zones as $zone)
		{
			// Time zones not in a group we will ignore.
			if (strpos($zone, '/') === false)
			{
				continue;
			}

			// Get the group/locale from the timezone.
			list ($group, $locale) = explode('/', $zone, 2);

			// Only use known groups.
			if (in_array($group, self::$zones))
			{
				// Initialize the group if necessary.
				if (!isset($groups[$group]))
				{
					$groups[$group] = array();
				}

				// Only add options where a locale exists.
				if (!empty($locale))
				{
					$groups[$group][$zone] = $select->option($zone, str_replace('_', ' ', $locale), 'value', 'text', false);
				}
			}
		}

		// Sort the group lists.
		ksort($groups);

		foreach ($groups as &$location)
		{
			sort($location);
		}

		// Merge any additional groups in the XML definition.
		$groups = array_merge(parent::getGroups(), $groups);

		return $groups;
	}
134161
public function getGroupsDescription()
    {
        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(true);
        }

        // Get the member's groups, if any
        $groups = $this->owner->Groups();
        if ($groups->Count()) {
            // Collect the group names
            $groupNames = array();
            foreach ($groups as $group) {
                /** @var Group $group */
                $groupNames[] = html_entity_decode($group->getTreeTitle());
            }
            // return a csv string of the group names, sans-markup
            $result = preg_replace("#</?[^>]>#", '', implode(', ', $groupNames));
        } else {
            // If no groups then return a status label
            $result = _t(__CLASS__ . '.NOGROUPS', 'Not in a Security Group');
        }

        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(false);
        }
        return $result;
    }
1246420
public function getAliases($groupName, $reset = false)
    {
        if (!$reset && isset($this->aliases[$groupName])) {
            return $this->aliases[$groupName];
        }

        // Drush 9 uses 'site:alias', Drush <9 uses 'site-alias'. Fortunately
        // the alias 'sa' exists in both.
        $args = [$this->getDrushExecutable(), '@none', 'sa', '--format=json', '@' . $groupName];

        $aliases = [];

        // Run the command with a 5-second timeout. An exception will be thrown
        // if it fails.
        try {
            $result = $this->shellHelper->execute($args, null, true, true, [], 5);
            if (is_string($result)) {
                $aliases = (array) json_decode($result, true);
            }
        } catch (ProcessFailedException $e) {
            // The command will fail if the alias is not found. Throw an
            // exception for any other failures.
            if (stripos($e->getProcess()->getErrorOutput(), 'not found') === false) {
                throw $e;
            }
        }

        $this->aliases[$groupName] = $aliases;

        return $aliases;
    }
1300931
public function getGroupList()
    {
        $result = $this->httpRaw(self::WECHAT_GROUP_GET_URL . 'access_token=' . $this->getAccessToken());
        return isset($result['groups']) ? $result['groups'] : false;
    }
704620
private function getLanguages()
    {
        $directories = glob($this->basePath.'/*', GLOB_ONLYDIR);

        $languages = array_map(function ($dir) {
            $name = basename($dir);

            return in_array($name, $this->excluded, true) ? null : $name;
        }, $directories);

        return array_filter($languages);
    }
849642
protected function getTranslationGroups(Collection $list)
    {
        $groups = [];
        foreach ($list as $model) {
            if (!isset($groups[$model->area][$model->group])) {
                $groups[$model->area][$model->group] = [];
            }
            $groups[$model->area][$model->group] = Arr::add($groups[$model->area][$model->group], $model->key, $model->value);
        }
        return $groups;
    }
434663
protected function UserGroupDelete($groupName)
    {
        $return = [];
        $id = $this->UserGetGroupIdByCode($groupName);
        if ($id) {
            $group = new CGroup();
            if ($group->Delete($id)) {
                $return[] = "Delete group {$groupName}";
            } else {
                throw new Exception("Can't delete group {$groupName}");
            }
        } else {
            throw new Exception("Group {$groupName} does not exist");
        }

        return $return;
    }