Return the characters that are part of a group.

@param \Seat\Web\Models\Group $group

@return \Illuminate\Support\Collection
764548
public function getUserGroupCharacters(Group $group = null): Collection
    {

        if (! $group)
            return collect();

        return Group::with('users')->find($group->id)->users;
    }
1214680
public function withGroup($group)
    {
        $group = str_replace('\\', '/', $group);
        if (!isset(static::$instances[$group])) {
            $instance = new static($this->options);
            $instance->setGroup($group);
            static::$instances[$group] = $instance;
        }
        return static::$instances[$group];
    }
271873
public function group($group)
    {
        $group = $this->prepareNames(func_get_args(), false);
        $this->group = $group;
        return $this;
    }
659538
public function tenantsWithGroup(string $group = null): Collection
    {
        return $this->tenants->filter(function (Tenant $tenant) use ($group) {
            return $tenant->group === $group;
        });
    }
1168198
public function getTabGroup(string $group): TabGroup
    {
        if (!isset($this->tabGroups[$group])) {
            throw new \InvalidArgumentException(sprintf('Requested group named "%s" is not found. Did you forget to tag the service?', $group));
        }

        return $this->tabGroups[$group];
    }
1132073
private function getTopologyGroup(string $char): string
    {
        $groups = $this->chars;

        if (\strpos($groups[0], $char) !== false) {
            return 'u';
        }

        if (\strpos($groups[1], $char) !== false) {
            return 'l';
        }

        if (\strpos($groups[2], $char) !== false) {
            return 'd';
        }

        if (\strpos($groups[3], $char) !== false) {
            return 's';
        }

        throw new InvalidArgumentException('Out of group character provided.');
    }
626423
public function getSitesFromGroup($group = '')
    {
        Piwik::checkUserHasSuperUserAccess();

        $group = trim($group);
        $sites = $this->getModel()->getSitesFromGroup($group);

        foreach ($sites as &$site) {
            $this->enrichSite($site);
        }

        $sites = Site::setSitesFromArray($sites);
        return $sites;
    }
167422
public function getVariables($group)
    {
        $encodedValues = $this->getEnvironmentVariable($group);

        if ($encodedValues === null) {
            return null;
        }

        return $this->decode($encodedValues);
    }
1128753
protected String getCurrentValueForGroup(String group) {
		Object obj = groupValues.get(group);
		if (obj == null) {
			return "";
		}
		return obj.toString();
	}
441972
private function sortGroup(array $group)
    {
        if (empty($group)) {
            return [];
        }

        if ($this->sortType == self::SORT_TYPE_LENGTH) {
            usort($group, function ($a, $b) {
                $cmp = strlen($b) - strlen($a);

                if ($cmp === 0) {
                    $a = strtolower($a);
                    $b = strtolower($b);

                    $cmp = strcmp($b, $a);
                }

                return $cmp;
            });
        } elseif ($this->sortType == self::SORT_TYPE_ALPHABETIC) {
            usort($group, function ($a, $b) {
                $a = strtolower($a);
                $b = strtolower($b);

                $cmp = strcmp($b, $a);
                if ($cmp === 0) {
                    $cmp = strlen($b) - strlen($a);
                }

                return $cmp;
            });
        }

        if ($this->sortDirection == self::SORT_DIRECTION_ASC) {
            $group = array_reverse($group);
        }

        return $group;
    }
757633
protected function getDefaultAttributes($group)
    {
        if (! ($group instanceof Group)) {
            throw new InvalidArgumentException(
                get_class($this).' can only serialize instances of '.Group::class
            );
        }

        return [
            'nameSingular' => $this->translateGroupName($group->name_singular),
            'namePlural'   => $this->translateGroupName($group->name_plural),
            'color'        => $group->color,
            'icon'         => $group->icon,
        ];
    }
1286684
public function insertGroup(Group $group)
    {
        $this->om->persist($group);
        $this->eventDispatcher->dispatch('log', 'Log\LogGroupCreate', [$group]);
        $this->om->flush();

        return $group;
    }
427592
public function serialize(Group $group, array $options = [])
    {
        return [
            'id' => $group->getUuid(),
            'name' => $group->getName(),
            'roles' => array_map(function (Role $role) use ($options) {
                return $this->roleSerializer->serialize($role, $options);
            }, $group->getEntityRoles()->toArray()),
            'organizations' => array_map(function (Organization $organization) use ($options) {
                return $this->organizationSerializer->serialize($organization, $options);
            }, $group->getOrganizations()->toArray()),
        ];
    }
1014094
public function get(string $group, string $key)
    {
        return $this->values[$group][$key] ?? null;
    }
1223269
public function fetchGroupMembers($groupId)
    {
        $result = $this->_get($this->_groupUrl($groupId, '/members'));
        return Deserialize::groupMembers($result);
    }
268625
public function all($group = null) {
        if(! is_null($group))
            return $this->model->where('group', $group)->lists('value', 'key');

        return $this->model->lists('value', 'key');
    }
545293
public function setGroup($group)
    {
        $this->fieldName = null;

        $group = str_replace('.', '/', $group);

        $this->group = $group;

        return $this;
    }