public function loadGroupsFrom(array $items = [], $withAccess = false)
    {
        $idList = [];

        foreach ($items as $item) {
            if (is_numeric($item)) {
                $groupId = (int)$item;
            } else if ($item instanceof GroupMember) {
                $groupId = $item->getGroupId();
            } else if ($item instanceof GroupSite) {
                $groupId = $item->getGroupId();
            } else {
                throw new \InvalidArgumentException(sprintf("given input is nor an integer nor a %s nor %s instance", GroupMember::class, GroupSite::class));
            }
            // Avoid duplicates
            $idList[$groupId] = $groupId;
        }

        if (!$idList) {
            return [];
        }

        return $this->loadAll($idList, $withAccess);
    }