public function findUserListLike(User $user, $name)
    {
        $dql = 'SELECT l FROM Phraseanet:UsrList l
              JOIN l.owners o
            WHERE o.user = :usr_id AND l.name LIKE :name';

        $params = [
            'usr_id' => $user->getId(),
            'name'   => $name . '%'
        ];

        $query = $this->_em->createQuery($dql);
        $query->setParameters($params);

        return $query->getResult();
    }
public function findUserListLike(User $user, $name)
    {
        $dql = 'SELECT l FROM Phraseanet:UsrList l
              JOIN l.owners o
            WHERE o.user = :usr_id AND l.name LIKE :name';

        $params = [
            'usr_id' => $user->getId(),
            'name'   => $name . '%'
        ];

        $query = $this->_em->createQuery($dql);
        $query->setParameters($params);

        return $query->getResult();
    }
public function findUserListLike ( User $ user , $ name ) { $ dql = 'SELECT l FROM Phraseanet:UsrList l
              JOIN l.owners o
            WHERE o.user = :usr_id AND l.name LIKE :name' ; $ params = [ 'usr_id' => $ user -> getId ( ) , 'name' => $ name . '%' ] ; $ query = $ this -> _em -> createQuery ( $ dql ) ; $ query -> setParameters ( $ params ) ; return $ query -> getResult ( ) ; }
Search for a UsrList like '' with a given value, for a user

@param  User                                         $user
@param  type                                         $name
@return \Doctrine\Common\Collections\ArrayCollection
Search for a UsrList like with a given value for a user