Skip to content

Commit

Permalink
139: show only active categories, refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewizotov committed Aug 31, 2018
1 parent ea8ea88 commit 0d52d0d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ public function getTree(ResolveInfo $resolveInfo, int $rootCategoryId) : array
$collection->addIsActiveFilter();
$collection->setOrder('level');
$collection->getSelect()->orWhere(
$collection->getSelect()->getConnection()->quoteIdentifier(
'e.'. $this->metadata->getMetadata(CategoryInterface::class)->getIdentifierField()) . ' = ?',
$collection->getSelect()
->getConnection()
->quoteIdentifier('e.' . $this->metadata->getMetadata(CategoryInterface::class)->getIdentifierField()) . ' = ?',
$rootCategoryId
);

Expand Down

0 comments on commit 0d52d0d

Please sign in to comment.