Exemplo n.º 1
0
 /**
  * Draws the page shell.
  * @param bool $echo
  * @return false|string
  */
 function drawPage($echo = true)
 {
     // Get messages and flush session
     $this->messages = site()->session()->getAndFlushMessages();
     // End session BEFORE we output any data
     session_write_close();
     return parent::drawPage($echo);
 }
Exemplo n.º 2
0
 /**
  * Extension-aware version of the template drawing function
  *
  * @param string $templateName
  * @param bool $returnBlank
  * @return \Bonita\false|string
  */
 function draw($templateName, $returnBlank = true)
 {
     $result = parent::draw($templateName, $returnBlank);
     if (!empty($this->extensions[$templateName])) {
         foreach ($this->extensions[$templateName] as $template) {
             $result .= parent::draw($template, $returnBlank);
         }
     }
     return $result;
 }