public function reverseTransform($array)
    {
        if (is_array($array) && array_key_exists(0, $array)) {
            $newIds = [];
            $ids = explode(',', $array[0]);
            $repo = $this->em->getRepository('VictoireBlogBundle:Tag');

            $objects = $repo->findById($ids);
            foreach ($objects as $object) {
                if (false !== $key = array_search($object->getId(), $ids)) {
                    $newIds[] = $ids[$key];
                    unset($ids[$key]);
                }
            }

            $objectsArray = [];
            foreach ($ids as $title) {
                if ($title !== '') {
                    $object = new Tag();
                    $object->setTitle($title);
                    $this->em->persist($object);
                    $objectsArray[] = $object;
                }
            }
            $this->em->flush();

            foreach ($objectsArray as $objectObj) {
                $newIds[] = $objectObj->getId();
            }

            return $newIds;
        }

        return $array;
    }