added table-column ordering (#1086)
This commit is contained in:
@@ -66,19 +66,21 @@ class UserController extends AbstractController
|
||||
{
|
||||
$query = new UserQuery();
|
||||
$query->setPage($page);
|
||||
$query->setOrderBy('username');
|
||||
|
||||
$form = $this->getToolbarForm($query);
|
||||
$form->setData($query);
|
||||
$form->submit($request->query->all(), false);
|
||||
|
||||
if (!$form->isValid()) {
|
||||
$query->resetByFormError($form->getErrors());
|
||||
}
|
||||
|
||||
/* @var $entries Pagerfanta */
|
||||
$entries = $this->getRepository()->findByQuery($query);
|
||||
|
||||
return $this->render('user/index.html.twig', [
|
||||
'entries' => $entries,
|
||||
'query' => $query,
|
||||
'showFilter' => $query->isDirty(),
|
||||
'toolbarForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user