Back to WebApplication class

Method render

protected void
render
()
Rendering is the process of pushing the document buffers into the template placeholders, retrieving data from the document and pushing it into the application response buffer.
Returns
  • void
Since
  • 1.7.3

Method render - Source code

/**
 * Rendering is the process of pushing the document buffers into the template
 * placeholders, retrieving data from the document and pushing it into
 * the application response buffer.
 *
 * @return  void
 *
 * @since   1.7.3
 */
protected function render()
{
    // Setup the document options.
    $options = array('template' => $this->get('theme'), 'file' => $this->get('themeFile', 'index.php'), 'params' => $this->get('themeParams'), 'templateInherits' => $this->get('themeInherits'));
    if ($this->get('themes.base')) {
        $options['directory'] = $this->get('themes.base');
    } else {
        $options['directory'] = \defined('JPATH_THEMES') ? JPATH_THEMES : (\defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
    }
    // Parse the document.
    $this->document->parse($options);
    // Render the document.
    $data = $this->document->render($this->get('cache_enabled'), $options);
    // Set the application output data.
    $this->setBody($data);
}