code: 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);
      }
docs: 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