<commit_before><?php

namespace Application\ChangementsBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormError;
use Doctrine\ORM\QueryBuilder;

class ChangementsFilterAmoiType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {


        $builder
                ->add('nom', 'genemu_jqueryautocomplete_text', array(
                    'label' => 'Nom',
                    'widget_addon' => array(
                        'icon' => 'pencil',
                        'type' => 'prepend'
                    ),
                     'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                    'route_name' => 'ajax_nom',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))

                /*       ->add('description', 'genemu_jqueryautocomplete_text', array(
                  'label' => 'Description',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false,
                  'route_name' => 'ajax_description',
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  )) */
                /* ->add('nom', 'text', array(
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false)) */
                ->add('description', 'text', array(
                    'widget_addon' => array(
                        'icon' => 'pencil',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))
                ->add('dateDebut', 'text', array(
                    'attr' => array(
                        'placeholder' => '> date debut'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false
                ))
                ->add('dateDebut_max', 'text', array(
                    'attr' => array(
                        'placeholder' => '< date debut'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false
                ))
                ->add('dateFin', 'text', array(
                    'attr' => array(
                        'placeholder' => '> date Fin'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))
                ->add('dateFin_max', 'text', array(
                    'attr' => array(
                        'placeholder' => '< date Fin'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))

                /*  ->add('ticketExt', 'genemu_jqueryautocompleter_entity', array(
                  'label'=>'Ticket Externe XX',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'required' => false,
                  'mapped'=>false
                  'empty_value'=>false,
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  'query_builder' => function(EntityRepository $em) {
                  return $em->createQueryBuilder('u')
                  ->where('u.ticketExt IS NOT NULL')
                  ->orderBy('u.ticketExt', 'ASC');
                  },
                  'property' => 'ticketExt',
                  // 'configs' => array(
                  //  'minLength' => 2,
                  //  ),
                  )) */



                /*  ->add('ticketExt','text',array('widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped'=>false,'required'=>false)) */

                /* ->add('ticketExt','text',array(
                  'attr' => array('style' => 'width:120px'),
                  'label'=>'Ticket Externe',
                  'widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped'=>false,'required'=>false)) */
                
                ->add('ticketInt', 'genemu_jqueryautocomplete_text', array(
                    'attr' => array('style' => 'width:120px'),
                    'label' => 'Ticket Interne',
                    'widget_addon' => array(
                        'icon' => 'tag',
                        'type' => 'prepend'
                    ),
                     'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                     'route_name' => 'ajax_ticketint',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))
                ->add('ticketExt', 'genemu_jqueryautocomplete_text', array(
                    'attr' => array('style' => 'width:120px'),
                    'label' => 'Ticket Externe',
                    'widget_addon' => array(
                        'icon' => 'tag',
                        'type' => 'prepend'
                    ),
                    'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                    'route_name' => 'ajax_ticketext',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))
              

                /* ->add('ticketExt', 'genemu_jqueryautocompleter_entity', array(
                  'label'=>'Ticket Externe XX',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'required' => false,
                  'mapped'=>false,
                  'empty_value'=>false,
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  'query_builder' => function(EntityRepository $em) {
                  return $em->createQueryBuilder('u')
                  ->where('u.ticketExt IS NOT NULL')
                  ->orderBy('u.ticketExt', 'ASC');
                  },
                  'property' => 'ticketExt',
                  // 'configs' => array(
                  //  'minLength' => 2,
                  //  ),
                  )) */
                /*    ->add('ticketInt', 'text', array(
                  'attr' => array('style' => 'width:120px'),
                  'label' => 'Ticket Interne',
                  'widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false)) */
                ->add('idEnvironnement', 'entity', array(
                    'class' => 'ApplicationRelationsBundle:Environnements',
                    'property' => 'nom',
                    'expanded' => false,
                    'multiple' => true,
                    'required' => false,
                    'label' => 'Environnements'
                ))
                ->add('idProjet', 'entity', array(
                    'class' => 'ApplicationRelationsBundle:Projet',
                    'query_builder' => function(EntityRepository $em) {
                        return $em->createQueryBuilder('u')
                                ->orderBy('u.nomprojet', 'ASC');
                    },<commit_msg>sf23:  essais left join fanta et knppaginator<commit_after><?php

namespace Application\ChangementsBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormError;
use Doctrine\ORM\QueryBuilder;

class ChangementsFilterAmoiType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {


        $builder
                ->add('nom', 'genemu_jqueryautocomplete_text', array(
                    'label' => 'Nom',
                    'widget_addon' => array(
                        'icon' => 'pencil',
                        'type' => 'prepend'
                    ),
                    'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                    'route_name' => 'ajax_nom',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))

                /*       ->add('description', 'genemu_jqueryautocomplete_text', array(
                  'label' => 'Description',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false,
                  'route_name' => 'ajax_description',
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  )) */
                /* ->add('nom', 'text', array(
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false)) */
                ->add('description', 'text', array(
                    'widget_addon' => array(
                        'icon' => 'pencil',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))
                ->add('dateDebut', 'text', array(
                    'attr' => array(
                        'placeholder' => '> date debut'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false
                ))
                ->add('dateDebut_max', 'text', array(
                    'attr' => array(
                        'placeholder' => '< date debut'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false
                ))
                ->add('dateFin', 'text', array(
                    'attr' => array(
                        'placeholder' => '> date Fin'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))
                ->add('dateFin_max', 'text', array(
                    'attr' => array(
                        'placeholder' => '< date Fin'),
                    'widget_addon' => array(
                        'icon' => 'time',
                        'type' => 'prepend'
                    ),
                    'mapped' => false, 'required' => false))

                /*  ->add('ticketExt', 'genemu_jqueryautocompleter_entity', array(
                  'label'=>'Ticket Externe XX',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'required' => false,
                  'mapped'=>false
                  'empty_value'=>false,
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  'query_builder' => function(EntityRepository $em) {
                  return $em->createQueryBuilder('u')
                  ->where('u.ticketExt IS NOT NULL')
                  ->orderBy('u.ticketExt', 'ASC');
                  },
                  'property' => 'ticketExt',
                  // 'configs' => array(
                  //  'minLength' => 2,
                  //  ),
                  )) */



                /*  ->add('ticketExt','text',array('widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped'=>false,'required'=>false)) */

                /* ->add('ticketExt','text',array(
                  'attr' => array('style' => 'width:120px'),
                  'label'=>'Ticket Externe',
                  'widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped'=>false,'required'=>false)) */
                ->add('ticketInt', 'genemu_jqueryautocomplete_text', array(
                    'attr' => array('style' => 'width:120px'),
                    'label' => 'Ticket Interne',
                    'widget_addon' => array(
                        'icon' => 'tag',
                        'type' => 'prepend'
                    ),
                    'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                    'route_name' => 'ajax_ticketint',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))
                ->add('ticketExt', 'genemu_jqueryautocomplete_text', array(
                    'attr' => array('style' => 'width:120px'),
                    'label' => 'Ticket Externe',
                    'widget_addon' => array(
                        'icon' => 'tag',
                        'type' => 'prepend'
                    ),
                    'configs' => array('minLength' => 2),
                    'mapped' => false, 'required' => false,
                    'route_name' => 'ajax_ticketext',
                    'class' => 'Application\ChangementsBundle\Entity\Changements',
                ))

                /*
                 * de apy
                 * 


                  SELECT
                  DISTINCT p0_.nomprojet AS nomprojet0
                  FROM
                  changements_main c1_
                  LEFT JOIN projet_main p0_ ON c1_.id_projet = p0_.id
                  LEFT JOIN chrono_user c2_ ON c1_.demandeur = c2_.id
                  LEFT JOIN changements_status c3_ ON c1_.id_status = c3_.id
                  LEFT JOIN changements_environnements c5_ ON c1_.id = c5_.changements_id
                  LEFT JOIN environnement_main e4_ ON e4_.id = c5_.environnements_id
                  GROUP BY
                  c1_.id
                  ORDER BY
                  p0_.nomprojet ASC


                  'query_builder' => function(SlotRepository $cr) use ($users) {
                  return $cr->findAllFreeSlotByUsers($users);
                  }
                 */
                /* ->add('ticketExt', 'genemu_jqueryautocompleter_entity', array(
                  'label'=>'Ticket Externe XX',
                  'widget_addon' => array(
                  'icon' => 'pencil',
                  'type' => 'prepend'
                  ),
                  'required' => false,
                  'mapped'=>false,
                  'empty_value'=>false,
                  'class' => 'Application\ChangementsBundle\Entity\Changements',
                  'query_builder' => function(EntityRepository $em) {
                  return $em->createQueryBuilder('u')
                  ->where('u.ticketExt IS NOT NULL')
                  ->orderBy('u.ticketExt', 'ASC');
                  },
                  'property' => 'ticketExt',
                  // 'configs' => array(
                  //  'minLength' => 2,
                  //  ),
                  )) */
                /*    ->add('ticketInt', 'text', array(
                  'attr' => array('style' => 'width:120px'),
                  'label' => 'Ticket Interne',
                  'widget_addon' => array(
                  'icon' => 'tag',
                  'type' => 'prepend'
                  ),
                  'mapped' => false, 'required' => false)) */
                ->add('idEnvironnement', 'entity', array(
                    'class' => 'ApplicationRelationsBundle:Environnements',
                    'property' => 'nom',
                    'expanded' => false,
                    'multiple' => true,
                    'required' => false,
                    'label' => 'Environnements'
                ))
                ->add('idProjet', 'entity', array(
                     'class' => 'ApplicationRelationsBundle:Projet',
                   // 'class' => 'ApplicationChangementsBundle:Changements',
                    'query_builder' => function(EntityRepository $em) {
                        return $em->createQueryBuilder('u')
                                ->orderBy('u.nomprojet', 'ASC');
                              //   ->select('b.id,b.nomprojet')
                             //     ->leftJoin('a.idProjet', 'b')
                         //      ->orderBy('b.nomprojet', 'ASC');
                              /*  ->select('b.id')
                                ->leftJoin('a.idProjet', 'b')
                                ->leftJoin('a.demandeur', 'c')
                                ->leftJoin('a.idStatus', 'd')
                                ->leftJoin('a.picture', 'f')
                                ->addGroupBy('a.id')
                                ->add('orderBy', 'b.nomprojet DESC');*/
                        // ->getQuery()
                       // ->getArrayResult();
                    },
{'fraction_non_alphanumeric': 0.1418229680816058, 'fraction_numerical': 0.003071185697049468, 'mean_word_length': 1.106144606144606, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 338, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5712509', 'n_tokens_mistral': 4840, 'n_tokens_neox': 4350, 'n_words': 801}