标签: php symfony doctrine-orm repository
我有一个Category Entity和CategoryRepository。
class CategoryRepository extends EntityRepository { public function getTree() { $user = %this->getUser(); // <- How to get this logged user here? } }
如何在EntityRepository中获取当前登录的用户?