コード例 #1
0
 /**
  * Load post data to the template.
  *
  * @param IPost $post
  */
 public function load(IPost $post)
 {
     $this->template->set('title', $post->getTitle());
     $this->template->set('meta_title', $post->metaTitle());
     $this->template->set('meta_keywords', $post->metaKeywords());
     $this->template->set('meta_description', $post->metaDescription());
 }
コード例 #2
0
 /**
  * Return the view link.
  *
  * @return string
  */
 public function viewLink()
 {
     return \Html::link($this->entity->path(), $this->entity->getTitle(), ['target' => '_blank']);
 }