Newscoop\Entity\Repository\FeedbackRepository::getByUser PHP Method

getByUser() public method

public getByUser ( $p_user_id )
    public function getByUser($p_user_id)
    {
        $em = $this->getEntityManager();
        $qb = $em->createQueryBuilder();
        $qb->add('select', 'f.id')->add('from', 'Newscoop\\Entity\\Feedback f')->add('where', 'f.user = :p_user_id')->setParameter('p_user_id', $p_user_id);
        $query = $qb->getQuery();
        $feedbackIds = $query->getArrayResult();
        $clearFeedbackIds = array();
        foreach ($feedbackIds as $key => $value) {
            $clearFeedbackIds[] = $value['id'];
        }
        return $clearFeedbackIds;
    }