protected function view($file, array $params = []): TwigRenderer
    {
        $this->eventHandler->trigger(BeforeLoadView::class, [
            'file' => $file,
            'params' => $params,
        ]);

        /** @var TwigRenderer $renderer */
        $renderer = $this->app->make(TwigRenderer::class);

        return $renderer->loadWithController($this, $file, $params);
    }