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

        return $fieldFacet;
    }