Esempio n. 1
0
 public function testRenderReturnsTheSame()
 {
     $content = 'This <strong>content</strong> should remain the same';
     $page = new Page();
     $page->setRawContent($content);
     $this->assertEquals($content, $page->render());
 }
Esempio n. 2
0
 /**
  * Render the layout with a given Page.
  *
  * @param Page $page
  *
  * @return string
  */
 public function render(Page $page)
 {
     return $this->doRender($this->getRawContent(), $this->getAttributes() + ['content' => $page->getRenderedContent()]);
 }
Esempio n. 3
0
 /**
  * @return string
  */
 public function getPagePublishFilename(Page $page)
 {
     return ($page->getPublishName() === null ? pathinfo($page->getSource(), PATHINFO_FILENAME) : $page->getPublishName()) . '.' . ltrim($this->config['publish_extension'], '.');
 }