This topic contains 2 replies, has 2 voices, and was last updated by jakabadambalazs 9 years, 4 months ago.
- Topic
Hi,
I have this in services.yml:
123456parameters:mekit_list.datagrid_helper.class: Mekit\Bundle\ListBundle\Datagrid\ListDatagridHelperservices:mekit_list.datagrid_helper:class: %mekit_list.datagrid_helper.class%this in a datagrid:
12345678910111213141516...filters:columns:name:type: stringdata_name: a.nametype:type: entitydata_name: accountType.idoptions:field_options:class: MekitListBundle:ListItemproperty: labelmultiple: truequery_builder: @mekit_list.datagrid_helper->getListItemQueryBuilder...and this in the helpe class defined in services:
1234567891011121314151617181920212223<?phpnamespace Mekit\Bundle\ListBundle\Datagrid;use Doctrine\ORM\Query;use Doctrine\ORM\EntityRepository;class ListDatagridHelper {/*** @return callable*/public function getListItemQueryBuilder() {return function (EntityRepository $er) {$ListGroupName = "ACCOUNT_TYPE";return $er->createQueryBuilder('li')->innerJoin("li.listGroup", "lg")->where('lg.name = :list_group_name')->orderBy('li.label', 'ASC')->setParameter('list_group_name', $ListGroupName);};}}As you can guess I’d like to remove the
$ListGroupName = "ACCOUNT_TYPE";
from my helper class and define in in the filter section of my datagrid definition.How would you do that?
tnx
a\oro/platform(1.6.2) + oro/doctrine-extensions(1.0.7) + symfony/symfony(v2.3.27)
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.