src/PHPDish/Bundle/ForumBundle/Twig/TopicExtension.php
public function getThreads($criteria, array $orderBy = [], ?int $limit = null)
    {
        if ($criteria instanceof Criteria) {
            return $this->threadManager->findThreads($criteria);
        } else {
            return $this->threadManager->getThreadRepository()->findBy($criteria, $orderBy, $limit);
        }
    }
public function getThreads($criteria, array $orderBy = [], ?int $limit = null)
    {
        if ($criteria instanceof Criteria) {
            return $this->threadManager->findThreads($criteria);
        } else {
            return $this->threadManager->getThreadRepository()->findBy($criteria, $orderBy, $limit);
        }
    }
指定条件查找节点

@param array| $criteria
@param array $orderBy
@param int $limit
@return array