0
EasyAdminBundle 컨트롤러를 재정의하는 방법을 알고 싶습니다. 사실, 데이터베이스에서 사용자 지정 쿼리를 작성하고 dqlFilter를 사용하고 싶지 않습니다.easyAdminBundle 컨트롤러를 재정의하는 방법
다음은 내 config.yml 파일입니다.
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 the global help message'
fields: ['id', {property : 'userName', label : 'Users'}, {property: 'status', type: 'boolean'}, {property : 'lastLogin',format: 'D j-n-Y, h:i:s'}]
는 그리고 이것은 내가 BaseAdminController는 제가
namespace EmployeeBundle\Controller;
use JavierEguiluz\Bundle\EasyAdminBundle\Controller\AdminController as BaseAdminController;
use Symfony\Component\HttpFoundation\Request;
class UserController extends BaseAdminController
{
public function listUserAction()
{
}
}
봐()'공급 업체에서/javiereguiluz/easyadmin-번들/컨트롤러/AdminController.php – COil