symfony - How can i override easyAdminBundle Controller -
i want know how override easyadminbundle controller. actually, want write custom query database , don't want use dqlfilter.
following config.yml file.
easy_admin: site_name: 'site mame .' entities: user: class: employeebundle\entity\employeelogin controller: employeebundle\controller\usercontroller form: fields: ['id', {property : 'username', label : 'users'}, {property: 'status', type:'choice', type_options: {choices: {'active':'1', 'deactive':'0'}}}] new: title: 'add login' form_options: { validation_groups: ['default', 'employeelogin'] } fields: ['-id'] edit: title: 'edit login details' form_options: { validation_groups: ['default'] } label: 'employees' list: title: "%%entity_label%% customers" help: 'the list view overrides global message' fields: ['id', {property : 'username', label : 'users'}, {property: 'status', type: 'boolean'}, {property : 'lastlogin',format: 'd j-n-y, h:i:s'}]
and usercontroller extend baseadmincontroller please let me know how can customize query repository or within controller
namespace employeebundle\controller; use javiereguiluz\bundle\easyadminbundle\controller\admincontroller baseadmincontroller; use symfony\component\httpfoundation\request; class usercontroller extends baseadmincontroller { public function listuseraction() { } }
i did , wrkd hope helpful somone else
public function createlistquerybuilder($entityclass, $sortdirection, $sortfield = null, $dqlfilter = null) { $response = parent::createlistquerybuilder('employeelogin, employeemaster', $sortdirection, $sortfield, $dqlfilter); // todo: change autogenerated stub $response->join('entity.userid','emp'); $response->andwhere('emp.lastname = :role')->setparameter('role', 'sagir'); return $response;
Comments
Post a Comment