render

@param WidgetManager        $widget
@param string               $template
@param array                $messages
@param string               $engine
@param AbstractPackage|null $package

@return  string
@throws \ReflectionException
769945
public static function render(
        WidgetManager $widget,
        $template = 'windwalker.message.default',
        array $messages = null,
        $engine = 'php',
        AbstractPackage $package = null
    ) {
        $messages = $messages === null ? static::getMessages(true) : $messages;

        return $widget->render($template, ['messages' => $messages], $engine, $package);
    }
235688
public function render(string $template, array $data = []): string
	{
		$data = array_merge($this->data, $data);

		return $this->getRenderer()->make($template, $data)->render();
	}
47630
public function render($template = null)
    {
        if (null === $template) {
            $template = 'SilvestraAdminBundle:Menu:vertical_admin_menu.html.twig';
        }

        return $this->helper->render($template, $this->builder->build());
    }
752816
public function renderView($template, array $parameters = array())
    {
        $parameters['module'] = $this->module->createView();

        return $this->getContainer()->get('templating')->render($template, $parameters);
    }
1003745
public function render($methodName = null, $class = null, $package = null)
    {
        if (!$this->isEnabled()) {
            return true;
        }

        if (null != $package) {
            $this->package = $this->treatPackageName($package);
        }

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

        if (null != $methodName) {
            $this->method = $methodName;
        }

        $this->currentView = $this->getPathForView();
        @ob_start();
        @include $this->currentView;
        $this->viewBody = @ob_get_clean();
        if (!empty($this->layoutLocation)) {
            @ob_start();
            @include $this->layoutLocation;
            $this->viewBody = @ob_get_clean();
        }
        $this->response->setBody($this->viewBody);
        $this->response->sendResponse();
    }
1052111
public function renderRegistrationForm($widget = true, FormInterface $form = null, $template = null)
    {
        if (empty($form)) {
            $form = $this->securityFormFactory->createRegistrationForm();
        }
        if (null === $template) {
            $template = $widget
                ? 'DarvinUserBundle:Security/widget:register.html.twig'
                : 'DarvinUserBundle:Security:register.html.twig';
        }

        return $this->getTemplating()->render($template, [
            'form' => $form->createView(),
        ]);
    }
811121
public function render($template, $data = null)
    {
        // Append .twig to end of path
        if(substr($template,-5)!='.twig'){
            $template.= '.twig';
        }
        $env = $this->getInstance();
        $parser = $env->loadTemplate($template);

        return $parser->render($this->all(), $data);
    }
1233288
public function render(string $template, array $data = []): string
    {
        // we store the current state of the template variables
        // so that we have isolated cases on multiple calls to render()
        $backupVariables = $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables;

        if (!empty($data)) {
            $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables = $data;
        }

        try {
            ob_start();

            /** @noinspection PhpIncludeInspection */
            require $template;
        } finally {
            $output = ob_get_clean();
        }

        $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables = $backupVariables;

        return $output;
    }
1010287
protected function registerWidget(ContainerBuilder $container)
    {
        $templatingEngines = $container->hasParameter('templating.engines')
            ? $container->getParameter('templating.engines')
            : array('twig');

        if (in_array('php', $templatingEngines)) {
            $formResource = 'EWZRecaptchaBundle:Form';

            $container->setParameter('templating.helper.form.resources', array_merge(
                $container->getParameter('templating.helper.form.resources'),
                array($formResource)
            ));
        }

        if (in_array('twig', $templatingEngines)) {
            $formResource = '@EWZRecaptcha/Form/ewz_recaptcha_widget.html.twig';

            $container->setParameter('twig.form.resources', array_merge(
                $this->getTwigFormResources($container),
                array($formResource)
            ));
        }
    }
950247
protected function render($template, $data = null)
    {
        $twigView = $this->container->view;

        // By making page data a Twig Global, we can access page data in block elements
        // which are loaded by a Twig function
        $twigEnvironment = $twigView->getEnvironment();
        $twigEnvironment->addGlobal('page', $data);
        $twigEnvironment->addGlobal('alert', $this->alert);

        return $twigView->render($this->response, $template);
    }
274223
public function renderTemplate(string $template, array $variables = []): string
    {
        return $this->renderTemplateString($this->getTemplate($template), $variables);
    }
344052
public function renderWidget( $config = [] ) {

		$widgetHtml = $this->render( $this->template, [
			'login' => $this->login,
			'loginDisabled' => $this->loginDisabled,
			'loginMessage' => $this->loginMessage,
			'forgotPassword' => $this->forgotPassword,
			'registerDisabled' => $this->registerDisabled,
			'registerMessage' => $this->registerMessage,
			'register' => $this->register,
			'label' => $this->label,
			'fieldIcon' => $this->fieldIcon,
			'optionalFields' => $this->optionalFields,
			'actions' => $this->actions,
			'widget' => $this
		]);

		if( $this->wrap ) {

			return Html::tag( $this->wrapper, $widgetHtml, $this->options );
		}

		return $widgetHtml;
	}
931913
public function render()
    {
        list($layout, $engine) = array_values($this->getTemplate());

        $widget = WidgetHelper::createWidget($layout, $engine);

        list($route, $query, $type) = array_values($this->route);

        $result = $this->getResult();

        if (!$result->getPages()) {
            return null;
        }

        // If not route provided, use current route.
        if ($route === null) {
            $route = function ($queries) use ($query, $type) {
                $queries = array_merge((array) $queries, (array) $query);

                $uri = new Uri(Ioc::getUriData()->full);

                foreach ($queries as $k => $v) {
                    $uri->setVar($k, $v);
                }

                if (!$this->getRouter()) {
                    return $uri->toString(['path', 'query', 'fragment']);
                }

                $route = Ioc::getConfig()->get('route.matched');

                return $this->getRouter()->route($route, $uri->getQuery(true), $type);
            };
        }

        // If route is string, wrap it as a callback
        if (!$route instanceof \Closure) {
            $route = function ($queries) use ($route, $query, $type) {
                $queries = array_merge((array) $queries, (array) $query);

                if (!$this->getRouter()) {
                    $package = PackageHelper::getPackage();

                    // CoreRoute object not exists, we use global Route object.
                    return $package->router->route($route, $queries, $type);
                }

                // Use custom Route object.
                return $this->getRouter()->route($route, $queries, $type);
            };
        }

        return $widget->render(['pagination' => $result, 'route' => $route]);
    }
566274
public function renderBuildForm(\Twig_Environment $environment, $template = 'DarvinImageBundle:Archive/widget:build_form.html.twig')
    {
        if (empty($this->archiveFormFactory)) {
            return '';
        }

        return $environment->render($template, [
            'form' => $this->archiveFormFactory->createBuildFormView(),
        ]);
    }
425972
public function render($template, array $parameters = null, Response $response = null)
    {
        return parent::render($this->bundle->getBaseDirectory().DIRECTORY_SEPARATOR.'Templates'.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.$template, $parameters, $response);
    }
1058170
public function cmsWidget($widget)
    {
        $widget->setCurrentView($this->currentViewHelper->getCurrentView());

        try {
            $response = $this->widgetRenderer->renderContainer($widget, $widget->getCurrentView());
        } catch (\Exception $ex) {
            $response = $this->widgetExceptionHandler->handle($ex, $widget);
        }

        return $response;
    }
905679
public function render($template, array $locals = [])
    {
        foreach ($this->engines as $engine) {
            if ($engine->supports($template)) {
                return $engine->render($template, $locals);
            }
        }

        throw new Exception("Unable to find template [{$template}]");
    }