public function ajaxChoiceListAction(Request $request, $type)
    {
        return AjaxChoiceListHelper::generateResponse($request,
            $this->get('form.factory')->createBuilder($type, null,
                ['select2' => ['enabled' => true, 'ajax' => true]]));
    }
public function ajaxChoiceListAction(Request $request, $type)
    {
        return AjaxChoiceListHelper::generateResponse($request,
            $this->get('form.factory')->createBuilder($type, null,
                ['select2' => ['enabled' => true, 'ajax' => true]]));
    }
public function ajaxChoiceListAction ( Request $ request , $ type ) { return AjaxChoiceListHelper :: generateResponse ( $ request , $ this -> get ( 'form.factory' ) -> createBuilder ( $ type , null , [ 'select2' => [ 'enabled' => true , 'ajax' => true ] ] ) ) ; }
Gets the ajax response of choice list.

@param Request $request
@param string  $type

@return Response
Gets the ajax response of choice list .