/** * 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()); }
/** * 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); }
/** * Set the meta title. * * @param ViewTemplate $template */ public function handle(ViewTemplate $template) { $template->set('meta_title', trans('anomaly.module.posts::addon.name')); }
/** * Handle the command. * * @param ViewTemplate $template */ public function handle(ViewTemplate $template) { $template->set('meta_title', $this->type->getName()); }
/** * Set the meta title. * * @param ViewTemplate $template */ public function handle(ViewTemplate $template) { $template->set('meta_title', trans('anomaly.module.posts::breadcrumb.posts')); }
/** * Handle the command. * * @param ViewTemplate $template */ public function handle(ViewTemplate $template) { $template->set('meta_title', trans('anomaly.module.posts::breadcrumb.tagged', ['tag' => $this->tag])); }