Example #1
0
 /**
  * @param Entry $node
  * @param Config $params
  * @return \Todaymade\Daux\Format\Base\Page
  */
 public function generateOne(Entry $node, Config $params)
 {
     if ($node instanceof Raw) {
         return new RawPage($node->getPath());
     }
     if ($node instanceof ComputedRaw) {
         return new ComputedRawPage($node);
     }
     $params['request'] = $node->getUrl();
     return ContentPage::fromFile($node, $params, $this->daux->getContentTypeHandler()->getType($node));
 }
Example #2
0
 public function dump()
 {
     $dump = parent::dump();
     $dump['index'] = $this->getIndexPage() ? $this->getIndexPage()->getUrl() : '';
     $dump['first'] = $this->getFirstPage() ? $this->getFirstPage()->getUrl() : '';
     foreach ($this->getEntries() as $entry) {
         $dump['children'][] = $entry->dump();
     }
     return $dump;
 }