我在symfony 4中使用此捆绑包,我的过滤代码如下所示
{{ knp_pagination_filter(paginator, {
't.code': 'Code'
}) }}
以及我在/conf/目录
knp_paginator:
page_range: 5 # default page range used in pagination control
default_options:
page_name: page # page query parameter name
sort_field_name: sort # sort field query parameter name
sort_direction_name: direction # sort direction query parameter name
distinct: true # ensure distinct results, useful when ORM queries are using GROUP BY statements
filter_field_name: filterField
filter_value_name: filterValue
template:
pagination: '@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig'
sortable: '@KnpPaginator/Pagination/sortable_link.html.twig' # sort link template
filtration: '@KnpPaginator/Pagination/filtration.html.twig' # filters template
没有人面对过滤与过滤器的值非常严格相关的事实吗? 例如: 在过滤器字段"Apple"中输入时,底座具有"AppleJuice"和"Apple"的值,我没有看到值"AppleJuice",只有"Apple">
我可以在其中设置过滤器类型,其中"%"+较低(参数(+"%",例如较低(项目代码(
退出,在表服务文件中编写 SQL 查询