public function reverseTransform($groups)
    {
        $value = new ArrayCollection();
        if (is_array($groups) && array_key_exists('groups_collection', $groups)) {
            $groups = $groups['groups_collection'];
            foreach ($groups as $groupId => $group) {
                if (array_key_exists('group', $group) && $group['group']) {
                    $group = $this->groupRepository->find($groupId);
                    if (null !== $group && in_array($group->getSite()->getId(), $this->availableSiteIds)) {
                        $value->add($group);
                    }
                }
            }
        }

        return $value;
    }