Wallabag\CoreBundle\Entity\Entry::getId PHP Method

getId() public method

Get id.
public getId ( ) : integer
return integer
    public function getId()
    {
        return $this->id;
    }

Usage Example

 /**
  * Retrieve annotations for an entry.
  *
  * @ApiDoc(
  *      requirements={
  *          {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
  *      }
  * )
  *
  * @return Response
  */
 public function getAnnotationsAction(Entry $entry)
 {
     $annotationRows = $this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
     $total = count($annotationRows);
     $annotations = ['total' => $total, 'rows' => $annotationRows];
     $json = $this->get('serializer')->serialize($annotations, 'json');
     return $this->renderJsonResponse($json);
 }