public function addField(PanelFacet $panelFacet, $name, $isRequired, $type)
    {
        $this->om->startFlushSuite();
        $position = $this->om->count('Claroline\CoreBundle\Entity\Facet\FieldFacet');
        $fieldFacet = $this->createField($name, $isRequired, $type);
        $fieldFacet->setPanelFacet($panelFacet);
        $fieldFacet->setPosition($position);
        $this->om->persist($fieldFacet);
        $this->om->endFlushSuite();

        return $fieldFacet;
    }