public function addOrder(ORMFilterEvent $event)
    {
        $queryBuilder = $event->getQueryBuilder();
        $admin = $event->getAdmin();
        $actionConfiguration = $admin->getAction()->getConfiguration();

        $request = $this->requestStack->getMasterRequest();
        $sort = $request->get('sort');
        $alias = $queryBuilder->getRootAliases()[0];

        // The sort from the request override the configured one
        if ($sort) {
            $order = $request->get('order', 'asc');

            $queryBuilder->addOrderBy($alias.'.'.$sort, $order);
        } else {
            foreach ($actionConfiguration->getParameter('order') as $field => $order) {
                $queryBuilder->addOrderBy($alias.'.'.$field, $order);
            }
        }
    }