Exemplo n.º 1
0
 /**
  * Load post data to the template.
  *
  * @param PostInterface $post
  */
 public function load(PostInterface $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());
 }
Exemplo n.º 2
0
 /**
  * Preview a page.
  *
  * @param ViewTemplate            $template
  * @param PageRepositoryInterface $pages
  * @param                         $id
  * @return null|\Symfony\Component\HttpFoundation\Response
  */
 public function preview(ViewTemplate $template, PageRepositoryInterface $pages, $id)
 {
     if (!($page = $pages->findByStrId($id))) {
         abort(404);
     }
     $page->setAttribute('enabled', true);
     $type = $page->getType();
     $handler = $type->getHandler();
     $template->set('page', $page);
     $handler->make($page);
     return $page->getResponse();
 }
 /**
  * Handle the event.
  */
 public function handle()
 {
     $this->template->set('messages', $this->messages);
 }
 /**
  * Handle the event.
  */
 public function handle()
 {
     $this->template->set('breadcrumbs', $this->breadcrumbs);
 }
Exemplo n.º 5
0
 /**
  * Set the meta title.
  *
  * @param ViewTemplate $template
  */
 public function handle(ViewTemplate $template)
 {
     $template->set('meta_title', trans('anomaly.module.posts::addon.name'));
 }
Exemplo n.º 6
0
 /**
  * Handle the command.
  *
  * @param ViewTemplate $template
  */
 public function handle(ViewTemplate $template)
 {
     $template->set('meta_title', $this->type->getName());
 }
Exemplo n.º 7
0
 /**
  * Set the meta title.
  *
  * @param ViewTemplate $template
  */
 public function handle(ViewTemplate $template)
 {
     $template->set('meta_title', trans('anomaly.module.posts::breadcrumb.posts'));
 }
Exemplo n.º 8
0
 /**
  * Handle the command.
  *
  * @param ViewTemplate $template
  */
 public function handle(ViewTemplate $template)
 {
     $template->set('meta_title', trans('anomaly.module.posts::breadcrumb.tagged', ['tag' => $this->tag]));
 }