Back to JsonView class

Method display

public void
display
(mixed $tpl = null)
Execute and display a template script.
Parameters
  • string $tpl The name of the template file to parse; automatically searches through the template paths.
Returns
  • void
Since
  • 4.0.0
Class: JsonView
Project: Joomla

Method display - Source code

/**
 * Execute and display a template script.
 *
 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function display($tpl = null)
{
    // Serializing the output
    $result = json_encode($this->_output);
    // Pushing output to the document
    $this->document->setBuffer($result);
}