src/Controller/AdminControllerEvent.php
public function addViewModel($name, $model, $priority=0)
    {
        $this->models->insert($name, $model, $priority);

        return $this;
    }
public function addViewModel($name, $model, $priority=0)
    {
        $this->models->insert($name, $model, $priority);

        return $this;
    }
Adds a view model.

@param string    $name Name of the captureTo key.
@param ViewModel    $model
@param int $priority

@return self