main/core/Manager/FacetManager.php
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;
    }
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;
    }
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 ; }
Creates a new field for a facet.

@param PanelFacet $facet
@param string     $name
@param int        $type

@deprecated

@todo remove me

Used by claco form widget config
Creates a new field for a facet .