Jarves\Model\User::getGroupIds PHP Метод

getGroupIds() публичный Метод

public getGroupIds ( ) : string
Результат string comma separated list of ids
    public function getGroupIds()
    {
        if (null === $this->cachedGroupIds) {
            $userGroups = $this->getUserGroups();
            if (count($userGroups) > 0) {
                $inGroups = [];
                foreach ($userGroups as $group) {
                    $inGroups[] = $group->getGroupsId();
                }
                $this->cachedGroupIds = implode(', ', $inGroups);
            } else {
                $this->cachedGroupIds = '0';
            }
        }
        return $this->cachedGroupIds;
    }