public function __invoke(WikiPage $wikiPage) { $content = $wikiPage->getContent(); $content = $this->replaceWithCheckboxes($content); $wikiPage->setContent($content); return $wikiPage; }
public function __invoke(WikiPage $wikiPage) { $content = $wikiPage->getContent(); $content = $this->parsedown->text($content); $wikiPage->setContent($content); return $wikiPage; }
public function __invoke(WikiPage $wikiPage) { $meta = $wikiPage->getMeta(); if (empty($meta['template'])) { $template = $this->twig->loadTemplate('wikipage.twig.html'); } else { $template = $this->twig->loadTemplate($meta['template']); } $breadcrumbLinks = $this->breadcrumbs($wikiPage->getPath()); $breadcrumbActive = array_pop($breadcrumbLinks); $content = $template->render(array('breadcrumbLinks' => $breadcrumbLinks, 'breadcrumbActive' => $breadcrumbActive, 'content' => $this->twig->createTemplate($wikiPage->getContent()), 'source' => $wikiPage->getSource())); $wikiPage->setContent($content); return $wikiPage; }
public function __invoke(WikiPage $wikiPage) { $wikiPage->setContent($this->replacement); return $wikiPage; }