setView example

if ($this->engine === null) {
            $this->engine = Shopware()->Container()->get(\Enlight_Template_Manager::class);
        }
    }

    /** * Initials the Enlight_View_Default */
    protected function initView()
    {
        $view = new Enlight_View_Default($this->engine);
        $this->Action()->setView($view);
    }
}
/** * @var array */
    protected $context = [];

    /** * @param array $context */
    public function __construct(Enlight_Template_Manager $view$context = null)
    {
        $this->setView($view);

        if ($context !== null) {
            $this->setContext($context);
        }
    }

    /** * @param array $context * * @return Shopware_Components_StringCompiler */
    
 as $key) {
        $request->query->remove($key);
        $request->request->remove($key);
      }

      // Load the view.       if (!$entity = $this->storage->load($name)) {
        throw new NotFoundHttpException();
      }
      $view = $this->executableFactory->get($entity);
      if ($view && $view->access($display_id) && $view->setDisplay($display_id) && $view->display_handler->ajaxEnabled()) {
        $response->setView($view);
        // Fix the current path for paging.         if (!empty($path)) {
          $this->currentPath->setPath('/' . ltrim($path, '/')$request);
        }

        // Create a clone of the request object to avoid mutating the request         // object stored in the request stack.         $request_clone = clone $request;

        // Add all POST data, because AJAX is sometimes a POST and many things,         // such as tablesorts, exposed filters and paging assume GET.
Home | Imprint | This part of the site doesn't use cookies.