Contao\Template::output PHP Method

output() public method

Parse the template file and print it to the screen
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use Template::getResponse() instead.
public output ( )
    public function output()
    {
        @trigger_error('Using Template::output() has been deprecated and will no longer work in Contao 5.0. Use Template::getResponse() instead.', E_USER_DEPRECATED);
        $this->compile();
        header('Vary: User-Agent', false);
        header('Content-Type: ' . $this->strContentType . '; charset=' . \Config::get('characterSet'));
        echo $this->strBuffer;
        // Flush the output buffers (see #6962)
        $this->flushAllData();
    }

Usage Example

Example #1
0
 /**
  * Send the response to the client
  *
  * @param bool $blnCheckRequest If true, check for unsued $_GET parameters
  *
  * @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0.
  *             Use FrontendTemplate::getResponse() instead.
  */
 public function output($blnCheckRequest = false)
 {
     $this->compile($blnCheckRequest);
     parent::output();
 }
All Usage Examples Of Contao\Template::output