/** * @return Book */ public function getBook() { $book = null; if ($this->chapter && $this->chapter->getBook()) { $book = $this->chapter->getBook(); } return $book; }