sonata admin custom list field (not from entity)

与世无争的帅哥 提交于 2019-12-03 21:23:03

I believe the answer is easier than what you are looking for, unless I did not get what you are after.

In your entity, create the following method

public function isValid()
{
// do your business logic here
}

In your admin form listing then

protected function configureListFields(ListMapper $listMapper)
{
    $listMapper->add('isValid', 'boolean');
}

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!