Generating pagination to use with KnpPaginatorBundle