/**
  * @param int|Post $postId
  *
  * @return string
  *
  * @throws \UnexpectedValueException
  */
 public function getPermalink($postId)
 {
     $post = $postId instanceof Post ? $postId : $this->postManager->find($postId);
     if (!$post) {
         throw new \UnexpectedValueException(sprintf('No post with ID "%d"', $postId));
     }
     $permalinkStructure = $this->optionExtension->getOption('permalink_structure', '')->getValue();
     return $this->replacePostArguments($permalinkStructure, $post);
 }
 /**
  * @param Post $post
  *
  * @return string
  */
 public function getThumbnailUrl(Post $post)
 {
     return $this->postManager->getThumbnailPath($post);
 }