5
私は、このような方法でそのようなフィールドSonataAdminBundle model_type値フィルタは、
/**
* @ORM\ManyToOne(targetEntity="Town")
**/
protected $town;
と管理クラスに持って
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
...
->add('town', null, array('label' => 'Town'), null, array('expanded' => true, 'multiple' => true))
;
}
それは私にこのようなフィルタ与える:
をそして、私の質問です:私はのカスタムSQLを設定することができますか?エンティティ取得?たとえば、IDがIN(1、2)のタウンのみを選択しますか?