Renders the pagination template

@param string $template
@param array $queryParams
@param array $viewParams

@return string
509453
public function render($pagination, $template = null, array $queryParams = array(), array $viewParams = array())
    {
        $route = $this->request->attributes->get('_route');
        $params = array_merge($this->request->query->all(), $this->request->attributes->all());

        $data = $pagination->getPaginationData();
        $data['route'] = $pagination->getRoute();
        $data['query'] = $pagination->getParams();
        $merged = array_merge(
            $pagination->getPaginatorOptions(), // options given to paginator when paginated
            $pagination->getCustomParameters(), // all custom parameters for view
            $data // merging base route parameters last, to avoid broke of integrity
        );

        return $this->environment->render(
            $template ?: $pagination->getTemplate(),
            $merged
        );
    }
399107
public function show($template = '.app/system/helper/pagination/default') {
        $rand = rand(0, 2);
        $tpl = new Template($template, 'pagination_' . $rand, 0);
        $tpl->assign(['paginationFirst' => $this->_buttonFirst, 'paginationLast' => $this->_buttonLast, 'paginationBefore' => $this->_buttonBefore, 'paginationAfter' => $this->_buttonAfter, 'currentPage' => $this->_currentPage, 'paginationFirstBefore' => $this->_paginationFirstBefore, 'paginationLastAfter' => $this->_paginationLastAfter, 'urlFirst' => preg_replace('#\{page\}#isU', 1, $this->_url), 'urlLast' => preg_replace('#\{page\}#isU', $this->_nbrPage, $this->_url), 'urlBefore' => preg_replace('#\{page\}#isU', $this->_currentPage - 1, $this->_url), 'urlAfter' => preg_replace('#\{page\}#isU', $this->_currentPage + 1, $this->_url), 'pagination' => $this->_paginationList, 'totalPage' => $this->_paginationTotalPage, 'nbrPage' => $this->_nbrPage]);

        return $tpl->show();
    }
1021437
public function render($template, array $viewData = [])
    {
        $filePath = $this->finder->getTemplatePath($template);
        if ($filePath == false) {
            throw new InvalidArgumentException("Can't load template '$template'");
        }
        ob_start();
        extract($viewData);
        include($filePath);
        $contents = ob_get_contents();
        ob_end_clean();
        return $contents;
    }
486427
public function renderPage(string $template, array $data = []): string
    {
        $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables = $data;

        /** @noinspection PhpUnusedLocalVariableInspection */
        $content = $this->render($template, $data);

        try {
            ob_start();

            /** @noinspection PhpIncludeInspection */
            require $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlBasePage;
        } finally {
            $output = ob_get_clean();
        }

        return $output;
    }
404677
private function render($template, array $parameters = [])
    {
        if (!isset($this->resources[$template])) {
            $this->resources[$template] = $this->environment->loadTemplate($template);
        }

        return $this->resources[$template]->render($parameters);
    }
738766
private function _renderTemplate($template, $vars)
	{
		extract($vars, EXTR_SKIP);
		ob_start();

		try
		{
			require($template);
			$contents = ob_get_contents();
		}
		catch (Exception $e)
		{
			// TODO: come up with a clever way of chaining exceptions
			ob_end_clean();
			throw $e;
		}

		ob_end_clean();
		return $contents;
	}
520673
public function renderInitCmsBlock($template, LayoutBlockInterface $layoutBlock, $params = [])
    {
        if (!$serializedContent = $layoutBlock->getSnapshotContent()) {
            // Draft View
            $contentItem = $layoutBlock->getContent();
        } else {
            // Live View
            $contentItem = $this->serializer->deserialize(
                $serializedContent,
                $layoutBlock->getClassType(),
                'json'
            );
        }

        if (!is_object($contentItem)) {
            $this->layoutBlockAdmin->delete($layoutBlock);

            return '---';
        }

        $options = $contentItem->getTemplateOptions($params);

        $options = array_merge($options, $params);

        return $this->templating->render($template, $options);
    }
655243
public function getCoreRenderedTemplate( $template, $layout = NULL ) {
        return $this->render(POWERON_ROOT . DS . $template, $layout ? POWERON_ROOT . DS . $layout : NULL);
    }
611968
private function renderContent($params = null, $template = null)
    {
        try {
            $mode = null !== $this->getMode() ? $this->getMode() : $this->_object->getMode();
            $this->templateFile = $template;
            if (null === $this->templateFile && null !== $this->_object) {
                $this->templateFile = $this->getTemplateFile($this->_object, $mode);
                if (false === $this->templateFile) {
                    $this->templateFile = $this->getTemplateFile($this->_object, $this->getMode());
                }

                if (false === $this->templateFile && false === $this->_ignoreIfRenderModeNotAvailable) {
                    $this->templateFile = $this->getTemplateFile($this->_object);
                }
            }

            if (false === $this->isValidTemplateFile($this->templateFile)) {
                throw new RendererException(sprintf(
                        'Unable to find file \'%s\' in path (%s)', $template, implode(', ', $this->_scriptdir)
                ), RendererException::SCRIPTFILE_ERROR);
            }
        } catch (RendererException $e) {
            $render = '';

            // Unknown template, try to render subcontent
            if (null !== $this->_object && is_array($this->_object->getData())) {
                foreach ($this->_object->getData() as $subcontents) {
                    $subcontents = (array) $subcontents;

                    foreach ($subcontents as $sc) {
                        if ($sc instanceof RenderableInterface) {
                            $scRender = $this->render(
                                $sc, $this->getMode(), $params, $template, $this->_ignoreIfRenderModeNotAvailable
                            );

                            if (false === $scRender) {
                                throw $e;
                            }

                            $render .= $scRender;
                        }
                    }
                }
            }

            return $render;
        }

        $application = $this->getApplication();
        // Assign vars and parameters
        if (null !== $this->_object) {
            $draft = $this->_object->getDraft();
            $aClassContentClassname = 'BackBee\ClassContent\AbstractClassContent';
            if ($this->_object instanceof $aClassContentClassname && !$this->_object->isLoaded()) {
                // trying to refresh unloaded content
                $em = $application->getEntityManager();

                $classname = get_class($this->_object);
                $uid = $this->_object->getUid();

                $em->detach($this->_object);
                $object = $em->find($classname, $uid);
                if (null !== $object) {
                    $this->_object = $object;
                    if (null !== $draft) {
                        $this->_object->setDraft($draft);
                    }
                }
            }

            $this->assign($this->_object->getData());
            $this->setParam($this->_object->getAllParams());
        }

        if (null !== $application) {
            $application->debug(sprintf(
                'Rendering content `%s(%s)`.',
                get_class($this->_object),
                $this->_object->getUid()
            ));
        }

        return $this->renderTemplate();
    }
1011709
private static function getTemplate(string $template, array $params): string
    {
        if (empty($template)) {
            return '';
        }
        $names   = array_keys($params);
        $replace = array_values($params);
        $search  = array_map(function ($v) {
            return sprintf('{%s}', $v);
        }, $names);

        return str_replace($search, $replace, $template);
    }
871459
protected function render($template, array $params = array(), array $options = array())
    {
        $renderer = $this->serviceLocator->get('templating');

        // Helpers
        if (isset($options['helpers'])) {
            foreach ($options['helpers'] as $helper) {
                $renderer->addHelper($helper);
            }
        }

        return $renderer->render($template, $params);
    }
493083
public function renderViewAdmin( $template, $models, $config = [] ) {

		return $this->renderViewGeneric( $template, $models, CoreGlobal::TPL_VIEW_ADMIN, $config );
	}
1139984
public function render($template=null, array $params=[]) {
		if($template === null)
			$template = $this->template;
		$params = array_merge($this->params, $params);

		return static::renderFile($template, $params);
	}
435022
public function render($template, array $parameters = [])
    {
        $resource = $this->loadTemplate($template);

        $this->stack->push([
            $resource,
            $this->mergeShared($this->getParameters($template, $parameters))
        ]);

        $hash = $resource->getHash();

        if (isset($this->parents[$hash])) {
            throw new RenderException(sprintf('Circular reference in %s.', $template));
        }

        unset($this->parents[$hash]);

        $this->startErrorHandling();

        $content = $this->doRender();

        if (isset($this->parents[$hash])) {
            $content = $this->render($this->parents[$hash], $parameters);
        }

        $this->stopErrorHandling();

        $this->stack->pop();

        return $content;
    }
5577
public function render($page, array $params = null)
    {
        $this->setFile($page);

        try {
            if (! file_exists($file = $this->getFile())) {
                throw new NotFoundException("Template file couldn't be found: " . $file);
            }

            if (! empty($params)) {
                $this->assign($params);
            }
            
            $template = $this->tryCompile($file);
        } catch (Exception $e) {
            $this->flushSections();

            $this->dispatchEvent('exception', $e);

            throw $e;
        } catch (Throwable $e) {
            $this->flushSections();

            $this->dispatchEvent('fatal.error', $e);

            throw $e;
        } finally {
            $this->renderingCompleted(function () {
                $this->dispatchEvent('rendering.completed');

                $this->flushSections();

                $this->onEventEmitterEnabled(function ($emitter) {
                    $emitter->removeAllListeners();
                });

                unset($this->vars, $this->shared, $this->customDirectives); // Free the memory
            });
        }

        return $template;
    }
764188
protected function render(Response $response, $template, array $params = [])
    {
        return $this->container['twig']->render($response, $template, $params);
    }
478512
protected function renderPage($datasourceId, $template, array $baseQuery = [], $sortField = null, $sortOrder = Query::SORT_DESC, $limit = 10)
    {
        $datasource = $this->viewFactory->getDatasource($datasourceId);

        $inputDefinition = new InputDefinition($datasource, [
            'base_query'          => $baseQuery,
            'limit_default'       => $limit,
            'pager_enable'        => false,
            'search_enable'       => false,
            'sort_default_field'  => $sortField ? $sortField : '',
            'sort_default_order'  => $sortOrder,
        ]);
        $viewDefinition = new ViewDefinition([
            'enabled_filters'   => [],
            'properties'        => [],
            'show_filters'      => false,
            'show_pager'        => false,
            'show_search'       => false,
            'show_sort'         => false,
            'templates'         => ['default' => $template],
            'view_type'         => 'twig_page',
        ]);
        $query = $inputDefinition->createQueryFromArray([]);
        $items = $datasource->getItems($query);

        return $this->viewFactory->getView('twig_page')->render($viewDefinition, $items, $query);
    }