Renders the provided Pagerfanta view.
7399
public function renderCollectionPager(Pagerfanta $pagerfanta, Block $block, string $collectionIdentifier, array $options = []): string
    {
        $options['block'] = $block;
        $options['collection_identifier'] = $collectionIdentifier;

        return $this->pagerfantaView->render($pagerfanta, $this->routeGenerator, $options);
    }
800196
public function renderZf2(
        Response $response,
        ModelInterface $layoutView,
        ViewModel $viewModel,
        PageDataBc $pageData
    ) {
        if (empty($pageData->getPage())) {
            $response->setStatusCode($this->pageStatus->getNotFoundStatus());

            return $response;
        }

        $httpStatus = $pageData->getHttpStatus();

        if ($httpStatus == $this->pageStatus->getNotAuthorizedStatus()) {
            $response->setStatusCode($this->pageStatus->getNotAuthorizedStatus());

            return $response;
        }

        $response->setStatusCode(
            $httpStatus
        );

        $site = $pageData->getSite();
        $page = $pageData->getPage();
        $requestedPageData = $pageData->getRequestedPage();

        $layoutView = $this->prepareLayoutView(
            $layoutView,
            $site,
            $page
        );

        $layoutView->setVariable(
            'page',
            $page
        );

        $layoutView->setVariable(
            'site',
            $site
        );

        $layoutView->setVariable(
            'httpStatus',
            $httpStatus
        );

        $layoutView->setVariable(
            'requestedPageData',
            $requestedPageData
        );

        $viewModel->setVariable(
            'page',
            $page
        );
        $viewModel->setVariable(
            'httpStatus',
            $httpStatus
        );

        $viewModel->setTemplate(
            'pages/'
            . $this->getLayoutManager()->getSitePageTemplate(
                $site,
                $page->getPageLayout()
            )
        );

        return $viewModel;
    }
795927
public function renderResponse(Pagerfanta $pager, AttributeInterface $attribute = null)
    {
        $results = [];
        try {
            /** @noinspection PhpParamsInspection */
            $this->dataLoader->load($pager, 2); // Try to load results if array of EAV data
        } catch (\InvalidArgumentException $e) {
            // Do nothing, it just means that we have an array of scalar
        }
        foreach ($pager as $data) {
            if ($data instanceof DataInterface) {
                $results[] = $this->parseResult($data, $attribute);
            } else {
                $results[] = $this->parseScalarResult($data);
            }
        }

        $headers = [
            'Cache-Control' => 'private, no-cache, no-store, must-revalidate',
            'Pragma' => 'private',
            'Expires' => 0,
        ];

        $response = [
            'results' => $results,
            'pagination' => [
                'more' => $pager->hasNextPage(),
            ],
        ];

        return new JsonResponse($response, 200, $headers);
    }
1027663
def render(template, entry)
      template.render(File.join('pageflow', name, 'widget'), entry: entry)
    end
843386
public function viewAction()
    {
        $model = $this->loadModel();
        if (!$model->getId()) {
            $this->_forward('noroute');
            return;
        }

        $this->loadLayout();
        $this->renderLayout();
    }
246474
public function render()
    {
        $this->getWpBridge()->addFilter('timber_post_getter_get_posts', [$this, 'addWpBridgeToPosts'], 10, 3);

        $context   = $this->getContext();
        $templates = $this->getTemplates();

        $this->validateTemplates($templates);
        $this->validateContext($context);

        $this->getTimberBridge()->render(
            $templates,
            array_merge($this->getTimberBridge()->getContext(), $context),
            ($this->getCacheExpiresSeconds() ?: false), // False disables cache altogether.
            $this->getCacheMode()
        );
    }
600007
function()
	{
		if(!this._modelBindersMap) this._initBinding();
		if(!this._collectionBinder)
		{
			this._explicitSubviewsStruct = null;

			if(this._template) this.element.innerHTML = this._template;

			if(this.render !== noop) this.render();
			this.renderSubviews();
		}
	}
9937
public function render()
	{
		// make sure we have a correct url
		$this->paginationUrl();

		// and a current page number
		$this->calculateNumbers();

		$urls = array();

		// generate the URL's for the pagination block
		if ($this->config['totalPages'] > 1)
		{
			// calculate start- and end page numbers
			$start = $this->config['current'] - floor($this->config['numberOfLinks'] * $this->config['linkOffset']);
			$end = $this->config['current'] + floor($this->config['numberOfLinks'] * ( 1 - $this->config['linkOffset']));

			// adjust for the first few pages
			if ($start < 1)
			{
				$end -= $start - 1;
				$start = 1;
			}

			// make sure we don't overshoot the current page due to rounding issues
			if ($end < $this->config['current'])
			{
				$start++;
				$end++;
			}

			// make sure we don't overshoot the total
			if ($end > $this->config['totalPages'])
			{
				$start = max(1, $start - $end + $this->config['totalPages']);
				$end = $this->config['totalPages'];
			}

			// now generate the URL's for the pagination block
			for($i = $start; $i <= $end; $i++)
			{
				$urls[$i] = $this->generateUrl($i);
			}
		}

		// send the generated url's to the view
		$this->view->set('urls', $urls);

		// store the current and total pages
		$this->view->set('active', $this->config['current']);
		$this->view->set('total', $this->config['totalPages']);

		// do we need to add a first link?
		if ($this->config['showFirst'])
		{
			$this->view->set('first', $this->generateUrl(1));
		}

		if (isset($start) and $start > 1)
		{
			$this->view->set('previous', $this->generateUrl($start-1));
		}

		if (isset($end) and $end !== $this->config['totalPages'])
		{
			$this->view->set('next', $this->generateUrl($end+1));
		}

		// do we need to add a last link?
		if ($this->config['showLast'])
		{
			$this->view->set('last', $this->generateUrl($this->config['totalPages']));
		}

		$this->view->set('align', $this->config['align']);

		// return the view
		return $this->view;
	}
1302348
protected void renderComments(PageRequestContext requestContext, QueryPage queryPage, QueryReply queryReply, boolean commentable, boolean viewDiscussion) {
    Query query = queryPage.getQuerySection().getQuery();
    Panel panel = ResourceUtils.getResourcePanel(query);
    
    RequiredQueryFragment queryFragment = new RequiredQueryFragment("comments");
    queryFragment.addAttribute("panelId", panel.getId().toString());
    queryFragment.addAttribute("queryId", query.getId().toString());
    queryFragment.addAttribute("pageId", queryPage.getId().toString());
    
    if (queryReply != null) {
      queryFragment.addAttribute("queryReplyId", queryReply.getId().toString());
    }
    
    queryFragment.addAttribute("queryPageCommentable", commentable ? "true" : "false");
    queryFragment.addAttribute("queryViewDiscussion", viewDiscussion ? "true" : "false");
    addRequiredFragment(requestContext, queryFragment);  
  }
68557
def render_view(view_name, **args):
    ''''''
    try:
        root_xml = get_view_root(view_name)
        return render(root_xml, **args)
    except CoreError as error:
        error.add_view_info(ViewInfo(view_name, None))
        raise
    except:
        info = exc_info()
        error = ViewError('Unknown error occured during rendering', ViewInfo(view_name, None))
        error.add_cause(info[1])
        raise error from info[1]
271415
function render(view, options) {
  var self = this;
  options = options || {};

  for (var name in settings._filters) {
    options[name] = settings._filters[name];
  }

  if (settings.helpers) {
    for (var k in settings.helpers) {
      var helper = settings.helpers[k];
      if (typeof helper === 'function') {
        helper = helper(self.req, self);
      }
      if (!options.hasOwnProperty(k)) {
        options[k] = helper;
      }
    }
  }

  if (settings.filters) {
    for (var name in settings.filters) {
      options[name] = settings.filters[name];
    }
  }

  // add request to options
  if (!options.request) {
    options.request = self.req;
  }
  // render view template
  _render(view, options, function (err, str) {
    if (err) {
      return self.req.next(err);
    }
    var layout = typeof options.layout === 'string' ? options.layout : settings.layout;
    if (options.layout === false || !layout) {
      return send(self, str);
    }
    // render layout template, add view str to layout's locals.body;
    options.body = str;
    _render(layout, options, function (err, str) {
      if (err) {
        return self.req.next(err);
      }
      send(self, str);
    });
  });
  return this;
}
61534
public function renderToolProspectsHeaderRefreshAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
        
        $view = new ViewModel();
        $view->melisKey = $melisKey;
        
        return $view;
    }
196217
public function renderView()
    {
        if (!$this->cb->triggered()) {
            if ($this->loadEvent) {
                $this->js($this->loadEvent, $this->jsLoad());
            }
            $this->add($this->shim);
        }

        return parent::renderView();
    }
516482
public function render()
  {
    $html = parent::render();

    $items = '';

    // Affichage lien FIRST
    if ($this->currentPage > 1) {
      $first = $this->getElementTemplate('first');
      $first = str_replace('%page%', 1, $first);
      $items .= $first;
    }

    // Affichage previous
    if ($this->currentPage > 1) {
      $prev = $this->getElementTemplate('previous');
      $prev = str_replace('%page%', $this->currentPage - 1, $prev);
      $items .= $prev;
    }

    // Affichage des pages
    $startPage = $this->currentPage - floor($this->maxShowedPages / 2);
    $endPage   = $this->currentPage + floor($this->maxShowedPages / 2);
    if ($startPage < 1) {
      $endPage += (1 - $startPage);
      $startPage = 1;
    }
    if ($endPage > $this->nbPages) {
      $endPage = $this->nbPages;
    }
    if (($endPage - $startPage + 1) != $this->maxShowedPages) {
      $startPage = $endPage - $this->maxShowedPages + 1;
      if ($startPage < 1) {
        $startPage = 1;
      }
    }
    for ($i = $startPage; $i <= $endPage; $i++) {
      if ($this->currentPage == $i) {
        $page = $this->getElementTemplate('selectedpage');
      } else {
        $page = $this->getElementTemplate('page');
      }
      $page = str_replace('%page%', $i, $page);
      $items .= $page;
    }

    // Affichage next
    if ($this->currentPage < $this->nbPages) {
      $next = $this->getElementTemplate('next');
      $next = str_replace('%page%', $this->currentPage + 1, $next);
      $items .= $next;
    }

    // Affichage last
    if ($this->currentPage != $this->nbPages && $this->nbPages > 0) {
      $last = $this->getElementTemplate('last');
      $last = str_replace('%page%', $this->nbPages, $last);
      $items .= $last;
    }

    $html = str_replace('%items%', $items, $html);

    return $html;
  }
205064
@Override
    public Page renderPage(String providerName, Map<String, Object> params)
    {
        if (!configMode)
            return super.renderPage(providerName, params);
        else
            return getPage();
    }
763978
function(filename, done) {
    this.debug('Capturing page at ' + filename);
    getPage(function(page) {
      page.render(filename, done);
    });
  }
455596
@Override
	public void render() {
		try {
			final HttpServletRequest request = Request.getServletRequest();
			request.getRequestDispatcher(uri).forward(request, Response.getServletResponse());
		} catch (Exception e) {
			throw new RenderException("Forward to " + uri + " error!", e);
		}
	}