public function viewHint(Paper $paper, Hint $hint)
    {
        $log = $this->om->getRepository('UJMExoBundle:LinkHintPaper')
            ->findOneBy(['paper' => $paper, 'hint' => $hint]);

        if (!$log) {
            $log = new LinkHintPaper($hint, $paper);
            $this->om->persist($log);
            $this->om->flush();
        }

        return $hint->getValue();
    }
public function viewHint(Paper $paper, Hint $hint)
    {
        $log = $this->om->getRepository('UJMExoBundle:LinkHintPaper')
            ->findOneBy(['paper' => $paper, 'hint' => $hint]);

        if (!$log) {
            $log = new LinkHintPaper($hint, $paper);
            $this->om->persist($log);
            $this->om->flush();
        }

        return $hint->getValue();
    }
public function viewHint ( Paper $ paper , Hint $ hint ) { $ log = $ this -> om -> getRepository ( 'UJMExoBundle:LinkHintPaper' ) -> findOneBy ( [ 'paper' => $ paper , 'hint' => $ hint ] ) ; if ( ! $ log ) { $ log = new LinkHintPaper ( $ hint , $ paper ) ; $ this -> om -> persist ( $ log ) ; $ this -> om -> flush ( ) ; } return $ hint -> getValue ( ) ; }
Returns the contents of a hint and records a log asserting that the hint
has been consulted for a given paper.

@param Paper $paper
@param Hint  $hint

@return string
Returns the contents of a hint and records a log asserting that the hint has been consulted for a given paper .