parse() public method

Parse the footer into the template
public parse ( )
Beispiel #1
0
 /**
  * Display the page
  */
 public function display()
 {
     // parse header
     $this->header->parse();
     // parse breadcrumb
     $this->breadcrumb->parse();
     // parse languages
     $this->parseLanguages();
     // parse footer
     $this->footer->parse();
     // assign the id so we can use it as an option
     $this->tpl->assign('isPage' . $this->pageId, true);
     $this->tpl->assign('isChildOfPage' . $this->record['parent_id'], true);
     // hide the cookiebar from within the code to prevent flickering
     $this->tpl->assign('cookieBarHide', !$this->get('fork.settings')->get('Core', 'show_cookie_bar', false) || CommonCookie::hasHiddenCookieBar());
     // the the positions to the template
     $this->parsePositions();
     // assign empty positions
     $unusedPositions = array_diff($this->record['template_data']['names'], array_keys($this->record['positions']));
     foreach ($unusedPositions as $position) {
         $this->tpl->assign('position' . \SpoonFilter::ucfirst($position), array());
     }
     // output
     return new Response($this->tpl->getContent($this->templatePath, false, true), $this->statusCode);
 }