From 2946595e38d4aebebb8e4f501e14a29db1101b3d Mon Sep 17 00:00:00 2001 From: Guillaume Manen Date: Wed, 4 Jun 2014 10:26:26 +0200 Subject: [PATCH] Revert "fix sort (need refacto)" This reverts commit f80b1d732456172cd10f7bc94c1ea06d78127bab. --- Controller/CrudController.php | 15 +++++---------- Subscriber/KnpSubscriber.php | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Controller/CrudController.php b/Controller/CrudController.php index a8f4b42..b673f69 100644 --- a/Controller/CrudController.php +++ b/Controller/CrudController.php @@ -268,21 +268,16 @@ protected function doIndex() { $entityClass = ltrim($this->getEntityClass(), '\\'); - $queryBuilder = $this + $query = $this ->getContextRepository() - ->createContextQueryBuilder($entityClass); - - foreach ($this->getFields()['join'] as $key => $field) { - $queryBuilder - ->join('e.'.$field, $key); - } - - $query = $queryBuilder + ->createContextQueryBuilder($entityClass) ->getQuery() ->setHint( Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\Translatable\Query\TreeWalker\TranslationWalker' - ); + ) + // ->getResult() + ; return $this->renderIndex($query); } diff --git a/Subscriber/KnpSubscriber.php b/Subscriber/KnpSubscriber.php index 9c1ce95..579603c 100644 --- a/Subscriber/KnpSubscriber.php +++ b/Subscriber/KnpSubscriber.php @@ -18,7 +18,7 @@ public function setRequest($request) public static function getSubscribedEvents() { return array( - 'knp_pager.items' => array('items', 1) + // 'knp_pager.items' => array('items', 1) ); }