src/Controller/ReclutaController.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Crud\Controller\crudPlainController;
  4. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use App\Entity\Recluta;
  8. use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  9. /**
  10.  * ReclutaProcesoController controller.
  11.  *
  12.  */
  13. class ReclutaController extends RegionProvinciaCantonParroquiaController
  14. {
  15.     public function showPDFAction($idRecluta$template)
  16.     {
  17.         $this->setInitialValues('all''recluta');
  18.         $entity $this->em->getRepository($this->bundleName.'\\Entity\\'.$this->className)->find($idRecluta);
  19.         if (!$entity
  20.           throw new \RuntimeException($this->translator->trans(
  21.                                                      'error.instance_not_found',
  22.                                                      array('%classname%' => $this->routeClassName.'/'.$this->className,
  23.                                                            '%id%'        => $id),
  24.                                                      'crud'));
  25.         $paramsForTwigShow $this->showCreateParamsForTwig($entity);
  26.         $paramsForTwigShow['tab']=-1;
  27.         return $this->render($template$paramsForTwigShow);        
  28.         
  29.     }        
  30.    
  31.     protected function getFormFilter()
  32.     {
  33.         $formulario parent::getFormFilter();
  34.         $repo $this->em->getRepository('App\\Entity\\ReclutaProceso');
  35.         $user $this->getUser();
  36.         unset($formulario['id']);
  37.         unset($formulario['apellidoMaterno']);
  38.         unset($formulario['apellidoPaterno']);
  39.         unset($formulario['email']);
  40.         unset($formulario['emailSMS']);
  41.         unset($formulario['fechaRegistro_WWdesdeWW']);
  42.         unset($formulario['fechaRegistro_WWhastaWW']);
  43.         unset($formulario['foto']);
  44.         unset($formulario['telefono']);
  45.         unset($formulario['estatura']);
  46.         unset($formulario['procesos']);
  47.         unset($formulario['edadString']);
  48.         unset($formulario['lugarNacimientoStr']);
  49.         unset($formulario['fotoCedula']);
  50.         
  51.         unset($formulario['telefonoEmergencias']);
  52.         if ($this->routeClassName == 'adminrecluta'){
  53.             unset($formulario['nombres']);
  54.             unset($formulario['sexo']);
  55.             unset($formulario['estadoCivil']);
  56.             unset($formulario['paisNacimiento']);
  57.             unset($formulario['lugarNacimiento']);
  58.             unset($formulario['fechaNacimiento_WWdesdeWW']);
  59.             unset($formulario['fechaNacimiento_WWhastaWW']);
  60.  
  61.             $formulario['nombreCompleto']=array('nombre'   =>'nombreCompleto',
  62.                             'tipo'     => null,
  63.                             'type'     => 'string',
  64.                             'atributos'=> array('label' => $this->translator->trans(
  65.                                                     $this->translatorBase.'.fields.nombres',
  66.                                                     array(),
  67.                                                     'crud').':',
  68.                                                 'required' => false,
  69.                                                 'attr'=>array('style'=>'width: 100%')));
  70.             $formulario['reclutaCentro']=array('nombre'   =>'reclutaCentro',
  71.                             'tipo'     => EntityType::class,
  72.                             'type'     => 'association',
  73.                             'atributos'=> array('label' => $this->translator->trans(
  74.                                                     $this->translatorBase.'.fields.centro',
  75.                                                     array(),
  76.                                                     'crud').':',
  77.                                                 'class' => 'App\\Entity\\CentroMovilizacion',
  78.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  79.                                                 'required' => false,
  80.                                                 'attr'=>array('style'=>'width: 100%')));
  81.             $formulario['reclutaProceso']=array('nombre'   =>'reclutaProceso',
  82.                             'tipo'     => EntityType::class,
  83.                             'type'     => 'association',
  84.                             'atributos'=> array('label' => $this->translator->trans(
  85.                                                     $this->translatorBase.'.fields.proceso',
  86.                                                     array(),
  87.                                                     'crud').':',
  88.                                                 'class' => 'App\\Entity\\ProcesoReclutamiento',
  89.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  90.                                                 'required' => false,
  91.                                                 'attr'=>array('style'=>'width: 100%')));
  92.             
  93.         }
  94.         elseif ($this->routeClassName == 'reporterecluta'){
  95.             $bckFormulario $formulario;
  96.             $params['distintivo']='_'.$this->routeClassName;    
  97.             $fUbicacion self::getFormularioLocalizacion($params$formulario'lugarNacimiento');
  98.             unset($formulario['identificacion']);
  99.             unset($formulario['nombres']);
  100.             unset($formulario['sexo']);
  101.             unset($formulario['edad']);
  102.             unset($formulario['estadoCivil']);
  103.             unset($formulario['lugarNacimiento']);
  104.             unset($formulario['paisNacimiento']);
  105.             unset($formulario['fechaNacimiento_WWdesdeWW']);
  106.             unset($formulario['fechaNacimiento_WWhastaWW']);
  107.  
  108.             $formulario['reclutaProceso']=array('nombre'   =>'reclutaProceso',
  109.                             'tipo'     => EntityType::class,
  110.                             'type'     => 'association',
  111.                             'atributos'=> array('label' => $this->translator->trans(
  112.                                                     $this->translatorBase.'.fields.proceso',
  113.                                                     array(),
  114.                                                     'crud').':',
  115.                                                 'class' => 'App\\Entity\\ProcesoReclutamiento',
  116.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  117.                                                 'required' => false,
  118.                                                 'attr'=>array('style'=>'width: 100%')));
  119.             
  120.             $formulario['reclutaBase']=array('nombre'   =>'reclutaBase',
  121.                             'tipo'     => EntityType::class,
  122.                             'type'     => 'association',
  123.                             'atributos'=> array('label' => $this->translator->trans(
  124.                                                     $this->translatorBase.'.fields.base',
  125.                                                     array(),
  126.                                                     'crud').':',
  127.                                                 'class' => 'App\\Entity\\BaseMovilizacion',
  128.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  129.                                                 'required' => false,
  130.                                                 'multiple'=>true,
  131.                                                 'attr'=>array('style'=>'width: 100%''class'=>'chosen-select')));
  132.             $formulario['reclutaCentro']=array('nombre'   =>'reclutaCentro',
  133.                             'tipo'     => EntityType::class,
  134.                             'type'     => 'association',
  135.                             'atributos'=> array('label' => $this->translator->trans(
  136.                                                     $this->translatorBase.'.fields.centro',
  137.                                                     array(),
  138.                                                     'crud').':',
  139.                                                 'class' => 'App\\Entity\\CentroMovilizacion',
  140.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  141.                                                 'required' => false,
  142.                                                 'multiple'=>true,
  143.                                                 'attr'=>array('style'=>'width: 100%''class'=>'chosen-select')));
  144.             $formulario['reclutaUnidad']=array('nombre'   =>'reclutaUnidad',
  145.                             'tipo'     => EntityType::class,
  146.                             'type'     => 'association',
  147.                             'atributos'=> array('label' => $this->translator->trans(
  148.                                                     $this->translatorBase.'.fields.unidad',
  149.                                                     array(),
  150.                                                     'crud').':',
  151.                                                 'class' => 'App\\Entity\\UnidadMilitar',
  152.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  153.                                                 'required' => false,
  154.                                                 'multiple'=>true,
  155.                                                 'attr'=>array('style'=>'width: 100%''class'=>'chosen-select')));
  156.             
  157.             if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_CENTRO') || $this->getUser()->isRoleAssigned('ROLE_OPERADOR_CENTRO'))
  158.             {
  159.                 $formulario['reclutaBase']['atributos']['query_builder'] = $repo->queryBasesPorProceso($user);
  160.                 $formulario['reclutaBase']['atributos']['disabled'] = true;
  161.                 $formulario['reclutaCentro']['atributos']['query_builder'] = $repo->queryCentrosPorBase($user);
  162.                 $formulario['reclutaCentro']['atributos']['disabled'] = true;
  163.                 $formulario['reclutaUnidad']['atributos']['query_builder'] = $repo->queryUnidadesPorCentro($user);
  164.             }
  165.             if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_BASE'))
  166.             {
  167.                 $formulario['reclutaBase']['atributos']['query_builder'] = $repo->queryBasesPorProceso($user);
  168.                 $formulario['reclutaBase']['atributos']['disabled'] = true;
  169.                 $formulario['reclutaCentro']['atributos']['query_builder'] = $repo->queryCentrosPorBase($user);
  170.                 $formulario['reclutaUnidad']['atributos']['query_builder'] = $repo->queryUnidadesPorCentro($user);
  171.             }
  172.             
  173.             
  174.             if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_BASE'))
  175.             {
  176.                 $formulario['reclutaCentro']['atributos']['query_builder'] = $repo->queryCentrosPorBase($user);
  177.                 $formulario['reclutaUnidad']['atributos']['query_builder'] = $repo->queryUnidadesPorCentro($user);
  178.             }
  179.             
  180.             $formulario['fechaNacimiento_WWdesdeWW'] = $bckFormulario['fechaNacimiento_WWdesdeWW'];
  181.             $formulario['fechaNacimiento_WWhastaWW'] = $bckFormulario['fechaNacimiento_WWhastaWW'];
  182.             $formulario['reclutaResultado']=array('nombre'   =>'reclutaResultado',
  183.                             'tipo'     => 'Symfony\Component\Form\Extension\Core\Type\ChoiceType',
  184.                             'type'     => 'boolean',
  185.                             'atributos'=> array('label' => $this->translator->trans(
  186.                                                     $this->translatorBase.'.fields.resultado',
  187.                                                     array(),
  188.                                                     'crud').':',
  189.                                                 'required' => false,
  190.                                                 'empty_data' => null,
  191.                                                 'attr'=>array('style'=>'width: 100%')));
  192.             $formulario['reclutaResultado']['atributos']['choices']=array($this->translator->trans('idoneo_valor.yes', array(), 'crud')=>'true',
  193.                                                               $this->translator->trans('idoneo_valor.no', array(), 'crud')=>'false');
  194.             $formulario['reclutaResultado']['atributos']['placeholder'] = $this->translator->trans('choice_value.empty_value',array(),'crud');
  195.             //$formulario['paisNacimiento'] = $bckFormulario['paisNacimiento'];
  196.             /*foreach ($fUbicacion as $key=>$valor)
  197.             {
  198.                 $formulario[$key]=$valor;
  199.             }*/
  200.         }
  201.         elseif ($this->routeClassName == 'reportereclutacentroinstruccion'){
  202.             $bckFormulario $formulario;
  203.             $params['distintivo']='_'.$this->routeClassName;    
  204.             $fUbicacion self::getFormularioLocalizacion($params$formulario'lugarNacimiento');
  205.             unset($formulario['identificacion']);
  206.             unset($formulario['nombres']);
  207.             unset($formulario['sexo']);
  208.             unset($formulario['edad']);
  209.             unset($formulario['estadoCivil']);
  210.             unset($formulario['lugarNacimiento']);
  211.             unset($formulario['paisNacimiento']);
  212.             unset($formulario['fechaNacimiento_WWdesdeWW']);
  213.             unset($formulario['fechaNacimiento_WWhastaWW']);
  214.  
  215.             $formulario['reclutaProceso']=array('nombre'   =>'reclutaProceso',
  216.                             'tipo'     => EntityType::class,
  217.                             'type'     => 'association',
  218.                             'atributos'=> array('label' => $this->translator->trans(
  219.                                                     $this->translatorBase.'.fields.proceso',
  220.                                                     array(),
  221.                                                     'crud').':',
  222.                                                 'class' => 'App\\Entity\\ProcesoReclutamiento',
  223.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  224.                                                 'required' => false,
  225.                                                 'attr'=>array('style'=>'width: 100%')));
  226.             
  227.             $formulario['reclutaCentroInstruccion']=array('nombre'   =>'reclutaCentroInstruccion',
  228.                             'tipo'     => EntityType::class,
  229.                             'type'     => 'association',
  230.                             'atributos'=> array('label' => $this->translator->trans(
  231.                                                     $this->translatorBase.'.fields.centro',
  232.                                                     array(),
  233.                                                     'crud').':',
  234.                                                 'class' => 'App\\Entity\\CentroInstruccion',
  235.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  236.                                                 'required' => false,
  237.                                                 'multiple'=>true,
  238.                                                 'attr'=>array('style'=>'width: 100%''class'=>'chosen-select')));
  239.             if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_CENTRO') || $this->getUser()->isRoleAssigned('ROLE_OPERADOR_CENTRO'))
  240.             {
  241.                 $queryBuilder $this->em->getRepository('App\\Entity\\CentroInstruccion')->createQueryBuilder('c')
  242.                          ->innerJoin('c.centrosMovilizacion','centroMovilizacion')
  243.                         ->where('centroMovilizacion.id='.$this->getUser()->getCentroMovilizacion()->getId());
  244.                 $formulario['reclutaCentroInstruccion']['atributos']['query_builder'] = $queryBuilder;
  245.                 //$formulario['reclutaCentroInstruccion']['atributos']['disabled'] = true;
  246.             }
  247.             if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_BASE'))
  248.             {
  249.                 $queryBuilder $this->em->getRepository('App\\Entity\\CentroInstruccion')->createQueryBuilder('c')
  250.                          ->leftJoin('c.centrosMovilizacion','centroMovilizacion')
  251.                         ->where('centroMovilizacion.base='.$this->getUser()->getBaseMovilizacion()->getId());
  252.                 $formulario['reclutaCentroInstruccion']['atributos']['query_builder'] = $queryBuilder;
  253.             }
  254.         }
  255.         elseif ($this->routeClassName == 'reportenoidoneos'){
  256.             $bckFormulario $formulario;
  257.             $params['distintivo']='_'.$this->routeClassName;    
  258.             $fUbicacion self::getFormularioLocalizacion($params$formulario'lugarNacimiento');
  259.             unset($formulario['identificacion']);
  260.             unset($formulario['nombres']);
  261.             unset($formulario['sexo']);
  262.             unset($formulario['edad']);
  263.             unset($formulario['estadoCivil']);
  264.             unset($formulario['lugarNacimiento']);
  265.             unset($formulario['paisNacimiento']);
  266.             unset($formulario['fechaNacimiento_WWdesdeWW']);
  267.             unset($formulario['fechaNacimiento_WWhastaWW']);
  268.  
  269.             $formulario['reclutaProceso']=array('nombre'   =>'reclutaProceso',
  270.                             'tipo'     => EntityType::class,
  271.                             'type'     => 'association',
  272.                             'atributos'=> array('label' => $this->translator->trans(
  273.                                                     $this->translatorBase.'.fields.proceso',
  274.                                                     array(),
  275.                                                     'crud').':',
  276.                                                 'class' => 'App\\Entity\\ProcesoReclutamiento',
  277.                                                 'placeholder' => $this->translator->trans('choice_value.empty_value',array(),'crud'),
  278.                                                 'required' => false,
  279.                                                 'attr'=>array('style'=>'width: 100%')));
  280.             
  281.         }
  282.         else {
  283.     //        unset($formulario['fechaNacimiento_WWdesdeWW']);
  284.     //        unset($formulario['fechaNacimiento_WWhastaWW']);
  285.         $params['distintivo']='_'.$this->routeClassName;    
  286.         $newFormulario self::getFormularioLocalizacion($params$formulario'lugarNacimiento');
  287.         
  288.         unset($formulario['lugarNacimiento']);
  289.         foreach ($newFormulario as $key=>$valor)
  290.         {
  291.             $formulario[$key]=$valor;
  292.         }
  293.         }
  294.         
  295.         return $formulario;
  296.     }
  297.     
  298.     protected function indexGetFields()
  299.     {
  300.         $fields parent::indexGetFields();
  301.         $newFields=array();
  302.         
  303.         $newFields['turno'] = array('nombre'=>'turno',
  304.                                              'type'=>'string',
  305.                                              'label'=>$this->translator->trans(
  306.                                                   $this->routeClassName.'.fields.turno',
  307.                                                   array(),
  308.                                                   'crud'));
  309.         
  310.         $newFields['centroMovilizacion'] = array('nombre'=>'centroMovilizacion',
  311.                                              'type'=>'string',
  312.                                              'label'=>$this->translator->trans(
  313.                                                   $this->routeClassName.'.fields.centroMovilizacion',
  314.                                                   array(),
  315.                                                   'crud'));
  316.         
  317.         $newFields['identificacion'] = $fields['identificacion'];
  318.         $newFields['nombreCompleto'] = array('nombre'=>'nombreCompleto',
  319.                                              'type'=>'string',
  320.                                              'label'=>$this->translator->trans(
  321.                                                   $this->routeClassName.'.fields.nombrecompleto',
  322.                                                   array(),
  323.                                                   'crud'));
  324. //        $newFields['fechaNacimiento'] = $fields['fechaNacimiento'];
  325.         $newFields['telefono'] = $fields['telefono'];
  326.         
  327.         
  328.         
  329.         
  330.         
  331. //        $newFields['movil'] = $fields['movil'];
  332. //        $newFields['tipoSangre'] = $fields['tipoSangre'];
  333.         $newFields['imagen'] = array('nombre' => 'imagen',
  334.                                       'type' => 'string',
  335.                                       'label'  => $this->translator->trans(
  336.                                           $this->routeClassName.'.fields.foto',
  337.                                           array(),
  338.                                           'crud'));
  339.         if ($this->routeClassName == 'reportereclutacentroinstruccion'){
  340.             $newFields['centroInstruccion'] = array('nombre'=>'centroInstruccion',
  341.                                                  'type'=>'string',
  342.                                                  'label'=>$this->translator->trans(
  343.                                                       $this->routeClassName.'.fields.centroInstruccion',
  344.                                                       array(),
  345.                                                       'crud'));
  346.         }
  347.         if ($this->routeClassName == 'reportenoidoneos'){
  348.             $newFields['causaRechazo'] = array('nombre'=>'causaRechazo',
  349.                                                  'type'=>'string',
  350.                                                  'label'=>$this->translator->trans(
  351.                                                       $this->routeClassName.'.fields.causaRechazo',
  352.                                                       array(),
  353.                                                       'crud'));
  354.         }
  355.         return $newFields;
  356.     } 
  357.     
  358.     protected function showGetFields($entity null
  359.     {
  360.         $fields parent::showGetFields($entity);
  361.         
  362.         $newFields=array();
  363.         $newFields['imagen'] = array('nombre' => 'imagen',
  364.                                              'type'=>'string',
  365.                                              'label'=>$this->translator->trans(
  366.                                           $this->routeClassName.'.fields.foto',
  367.                                                   array(),
  368.                                                   'crud'),
  369.             'atributos'=>array('attr'=>array('containerclass'=>'full-row')));
  370.         $newFields['identificacion'] = $fields['identificacion'];
  371.         $newFields['fechaNacimiento'] = $fields['fechaNacimiento'];
  372.         $newFields['apellidoPaterno'] = $fields['apellidoPaterno'];
  373.         $newFields['paisNacimiento'] = $fields['paisNacimiento'];
  374.         $newFields['apellidoMaterno'] = $fields['apellidoMaterno'];
  375.         $newFields['region'] = array('nombre'=>'region',
  376.                                              'type'=>'string',
  377.                                              'label'=>$this->translator->trans(
  378.                                                   $this->routeClassName.'.fields.region',
  379.                                                   array(),
  380.                                                   'crud'));    
  381.         $newFields['nombres'] = $fields['nombres'];
  382.         $newFields['provincia'] = array('nombre'=>'provincia',
  383.                                              'type'=>'string',
  384.                                              'label'=>$this->translator->trans(
  385.                                                   $this->routeClassName.'.fields.provincia',
  386.                                                   array(),
  387.                                                   'crud'));
  388.         $newFields['telefono'] = $fields['telefono'];
  389.         $newFields['telefonoEmergencias'] = $fields['telefonoEmergencias'];
  390.         $newFields['canton'] = array('nombre'=>'canton',
  391.                                       'type' => 'string',
  392.                                       'label'  => $this->translator->trans(
  393.                                                   $this->routeClassName.'.fields.canton',
  394.                                                   array(),
  395.                                                   'crud'));
  396.         $newFields['email'] = $fields['email'];
  397.         $newFields['lugarNacimiento'] = $fields['lugarNacimiento'];
  398.         $newFields['estatura'] = $fields['estatura'];
  399.         $newFields['estatura']['atributos']['attr']['containerclass']='full-row';
  400.         
  401.         $newFields['estadoCivil'] = $fields['estadoCivil'];
  402.         $newFields['estadoCivil']['atributos']['attr']['containerclass']='full-row';
  403.         $newFields['sexo'] = $fields['sexo'];
  404.         $newFields['sexo']['atributos']['attr']['containerclass']='full-row';
  405.         if ($this->routeClassName == 'adminrecluta'){
  406.             $newFields['lugarResidencia'] = array('nombre'=>'lugarResidencia',
  407.                                           'type' => 'integer',
  408.                                           'label'  => $this->translator->trans(
  409.                                                       $this->routeClassName.'.fields.lugarResidencia',
  410.                                                       array(),
  411.                                                       'crud'));
  412.             $newFields['cantonResidencia'] = array('nombre'=>'cantonResidencia',
  413.                                              'type'=>'string',
  414.                                              'label'=>$this->translator->trans(
  415.                                                       $this->routeClassName.'.fields.cantonResidencia',
  416.                                           array(),
  417.                                           'crud'));
  418.             $newFields['provinciaResidencia'] = array('nombre'=>'provinciaResidencia',
  419.                                           'type' => 'string',
  420.                                           'label'  => $this->translator->trans(
  421.                                                       $this->routeClassName.'.fields.provinciaResidencia',
  422.                                                       array(),
  423.                                                       'crud'));
  424.             $newFields['regionResidencia'] = array('nombre'=>'regionResidencia',
  425.                                           'type' => 'string',
  426.                                           'label'  => $this->translator->trans(
  427.                                                       $this->routeClassName.'.fields.regionResidencia',
  428.                                                       array(),
  429.                                                       'crud'));
  430.             $newFields['paisResidencia'] = array('nombre'=>'paisResidencia',
  431.                                           'type' => 'string',
  432.                                           'label'  => $this->translator->trans(
  433.                                                       $this->routeClassName.'.fields.paisResidencia',
  434.                                                       array(),
  435.                                                       'crud'));
  436.             $newFields['callePrincipalResidencia'] = array('nombre'=>'callePrincipalResidencia',
  437.                                           'type' => 'string',
  438.                                           'label'  => $this->translator->trans(
  439.                                                       $this->routeClassName.'.fields.callePrincipalResidencia',
  440.                                                       array(),
  441.                                                       'crud'));
  442.             $newFields['calleSecundariaResidencia'] = array('nombre'=>'calleSecundariaResidencia',
  443.                                           'type' => 'string',
  444.                                           'label'  => $this->translator->trans(
  445.                                                       $this->routeClassName.'.fields.calleSecundariaResidencia',
  446.                                                       array(),
  447.                                                       'crud'));
  448.             $newFields['numeroCasa'] = array('nombre'=>'numeroCasa',
  449.                                           'type' => 'string',
  450.                                           'label'  => $this->translator->trans(
  451.                                                       $this->routeClassName.'.fields.numeroCasa',
  452.                                                       array(),
  453.                                                       'crud'));
  454.             $newFields['referencias'] = array('nombre'=>'referencias',
  455.                                           'type' => 'string',
  456.                                           'label'  => $this->translator->trans(
  457.                                                       $this->routeClassName.'.fields.referencias',
  458.                                                       array(),
  459.                                                       'crud'));
  460.         }
  461.         return $newFields;
  462.     }
  463.     
  464.     protected function setFiltros()
  465.     {
  466.         if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_CENTRO') || $this->getUser()->isRoleAssigned('ROLE_OPERADOR_CENTRO'))
  467.         {
  468.             $this->filterData['reclutaCentro']= $this->getUser()->getCentroMovilizacion()->getId(); 
  469.         }
  470.         if ($this->getUser()->isRoleAssigned('ROLE_COORDINADOR_BASE'))
  471.         {
  472.             $this->filterData['reclutaBase']= $this->getUser()->getBaseMovilizacion()->getId(); 
  473.         }
  474.     } 
  475.     
  476. }