src/Controller/AdminControllerEvent.php
public function addViewTemplate($name, $template, $vars = [], $priority = 0)
    {
        if (is_int($vars)) {
            $priority = $vars;
            $vars = [];
        }

        $model = new ViewModel($vars);
        $model->setTemplate($template);

        return $this->addViewModel($name, $model, $priority);
    }
public function addViewTemplate($name, $template, $vars = [], $priority = 0)
    {
        if (is_int($vars)) {
            $priority = $vars;
            $vars = [];
        }

        $model = new ViewModel($vars);
        $model->setTemplate($template);

        return $this->addViewModel($name, $model, $priority);
    }
Creates a view model with template and adds it to the list.

@param string      $name Name of the captureTo key.
@param string      $template Name of the template (resolvable from view template resolver)
@param array $vars   additional variables for the view.
@param int   $priority

@return AdminControllerEvent