public function findOneById($id)
    {
        $query = $this->createValuedQueryBuilder('c')
            ->where('c.id = :id')
            ->setParameter('id', $id)
            ->getQuery();

        return $query->useResultCache(true, self::CACHE_TTL)->getSingleResult();
    }
public function findOneById($id)
    {
        $query = $this->createValuedQueryBuilder('c')
            ->where('c.id = :id')
            ->setParameter('id', $id)
            ->getQuery();

        return $query->useResultCache(true, self::CACHE_TTL)->getSingleResult();
    }
public function findOneById ( $ id ) { $ query = $ this -> createValuedQueryBuilder ( 'c' ) -> where ( 'c.id = :id' ) -> setParameter ( 'id' , $ id ) -> getQuery ( ) ; return $ query -> useResultCache ( true , self :: CACHE_TTL ) -> getSingleResult ( ) ; }
Find one by ID.

@param int $id

@return ContentInterface
Find one by ID .