' blocks)
If you're using this macro then you must comply with convention and use following query parameters:
- query - search query
- page - current page for pager
- order-by - which column is currently used for orderring
- order - order direction ('asc' or 'desc')
'columns' argument must be an associative array like:
'Human readable column name' => 'propertyName'
#}
{% macro sortable_columns(columns) %}
{% set route = app.request.attributes.get('_route') %}
{% set query = app.request.query.get('query') %}
{% set page = app.request.query.get('page') %}
{% set orderBy = app.request.query.get('order-by') %}
{% set order = app.request.query.get('order') %}
{% for column, property in columns %}
{% if property is not null %}
{{ column | raw }}
{% else %}
{{ column | raw }}
{% endif %}