Backend\Core\Engine\Header::parse PHP Method

parse() public method

Parse the header into the template
public parse ( )
    public function parse()
    {
        // put the page title in the <title>
        $this->tpl->assign('page_title', BL::getLabel($this->URL->getModule()));
        // parse CSS
        $this->parseCSS();
        // parse JS
        $this->parseJS();
    }

Usage Example

Beispiel #1
0
 /**
  * Display, this wil output the template to the browser
  * If no template is specified we build the path form the current module and action
  *
  * @param string $template The template to use, if not provided it will be based on the action.
  */
 public function display($template = null)
 {
     // parse header
     $this->header->parse();
     /*
      * If no template is specified, we have to build the path ourself. The default template is
      * based on the name of the current action
      */
     if ($template === null) {
         $template = $this->getBackendModulePath() . '/Layout/Templates/' . $this->URL->getAction() . '.tpl';
     }
     $this->content = $this->tpl->getContent($template);
 }