Skip to content

Instantly share code, notes, and snippets.

@trivoallan
Created March 31, 2014 12:20
Show Gist options
  • Select an option

  • Save trivoallan/9891089 to your computer and use it in GitHub Desktop.

Select an option

Save trivoallan/9891089 to your computer and use it in GitHub Desktop.
<?php
// generation filter
$builder->add('generation_name', 'entity', array(
'class' => 'AramisSpsCoreBundle:VehicleModelGeneration',
'property' => 'name_lc',
'query_builder' => function(EntityRepository $er) use($this) {
return $er->createQueryBuilder('vmg');
->where('vmg.vehicleModel = ' . $this->vehicleModelId)
->orderBy('vmg.name', 'ASC');
},
'expanded' => false,
'label' => 'Génération',
'multiple' => true,
'required' => false,
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment