Back to FormView 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
-
  • \Exception
Class: FormView
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
 *
 * @throws  \Exception
 */
public function display($tpl = null)
{
    // Prepare view data
    $this->initializeView();
    // Check for errors.
    if (\count($errors = $this->get('Errors'))) {
        throw new GenericDataException(implode("\n", $errors), 500);
    }
    // Build toolbar
    $this->addToolbar();
    parent::display($tpl);
}