AppBundle\Entity\User::getId PHP Method

getId() public method

public getId ( )
    public function getId()
    {
        return $this->id;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param User $user
  * @return array
  */
 public function getNotifications(User $user)
 {
     $qb = $this->createQueryBuilder('n');
     $qb->select('n.id, a.articleId, a.heading as article_heading, a.createdAt, u.username, img.path, v.heading as video_heading, v.videoId, l.linkId, l.heading as link_heading');
     $qb->leftJoin('n.article', 'a')->leftJoin('n.user', 'u')->leftJoin('u.profileImg', 'img')->leftJoin('n.video', 'v')->leftJoin('n.link', 'l')->where('a.userId = ' . $user->getId())->orWhere('v.userId = ' . $user->getId())->orWhere('l.userId = ' . $user->getId())->andWhere('n.seen = 0');
     return $qb->getQuery()->getResult();
 }
All Usage Examples Of AppBundle\Entity\User::getId