Bundle/WidgetBundle/Builder/WidgetFormBuilder.php
public function callBuildFormSwitchParameters(Widget $widget, $view, $businessEntityId, $position, $parentWidgetMap, $slotId, $quantum)
    {
        $entityClass = null;
        //if there is an entity
        if ($businessEntityId) {
            //get the businessClasses for the widget
            $classes = $this->container->get('victoire_core.helper.business_entity_helper')->getBusinessClassesForWidget($widget);

            //test the result
            if (!isset($classes[$businessEntityId])) {
                throw new \Exception('The entity '.$businessEntityId.' was not found int the business classes.');
            }
            //get the class of the entity name
            $entityClass = $classes[$businessEntityId]->getClass();
        }

        $form = $this->buildForm($widget, $view, $businessEntityId, $entityClass, $widget->getMode(), $slotId, $position, $parentWidgetMap, $quantum);

        return $form;
    }
public function callBuildFormSwitchParameters(Widget $widget, $view, $businessEntityId, $position, $parentWidgetMap, $slotId, $quantum)
    {
        $entityClass = null;
        //if there is an entity
        if ($businessEntityId) {
            //get the businessClasses for the widget
            $classes = $this->container->get('victoire_core.helper.business_entity_helper')->getBusinessClassesForWidget($widget);

            //test the result
            if (!isset($classes[$businessEntityId])) {
                throw new \Exception('The entity '.$businessEntityId.' was not found int the business classes.');
            }
            //get the class of the entity name
            $entityClass = $classes[$businessEntityId]->getClass();
        }

        $form = $this->buildForm($widget, $view, $businessEntityId, $entityClass, $widget->getMode(), $slotId, $position, $parentWidgetMap, $quantum);

        return $form;
    }
public function callBuildFormSwitchParameters ( Widget $ widget , $ view , $ businessEntityId , $ position , $ parentWidgetMap , $ slotId , $ quantum ) { $ entityClass = null ; //if there is an entity if ( $ businessEntityId ) { //get the businessClasses for the widget $ classes = $ this -> container -> get ( 'victoire_core.helper.business_entity_helper' ) -> getBusinessClassesForWidget ( $ widget ) ; //test the result if ( ! isset ( $ classes [ $ businessEntityId ] ) ) { throw new \ Exception ( 'The entity ' . $ businessEntityId . ' was not found int the business classes.' ) ; } //get the class of the entity name $ entityClass = $ classes [ $ businessEntityId ] -> getClass ( ) ; } $ form = $ this -> buildForm ( $ widget , $ view , $ businessEntityId , $ entityClass , $ widget -> getMode ( ) , $ slotId , $ position , $ parentWidgetMap , $ quantum ) ; return $ form ; }
Call the build form with selected parameter switch the parameters
The call is not the same if an entity is provided or not.

@param Widget $widget
@param View   $view
@param string $businessEntityId
@param int    $position
@param string $slotId

@throws \Exception

@return \Symfony\Component\Form\Form
Call the build form with selected parameter switch the parameters The call is not the same if an entity is provided or not .