/**
* Returns the \Doctrine\ORM\Query to select all active category by parent
*
* @param int $parentId
* @param int|null $customerGroupId
*
* @return Query<Category>
*/
public function getActiveByParentIdQuery($parentId,
$customerGroupId = null
) { $builder =
$this->
getActiveQueryBuilder($customerGroupId) ->
andWhere('c.parentId = :parentId'
) ->
setParameter('parentId',
$parentId);
return $builder->
getQuery();
} /**
* Returns the \Doctrine\ORM\Query to select all assigned categories by the articleId
*
* @param int $articleId
* @param int|null $parentId
*
* @return Query<Category>
*/