Renders the provided value.

@param array<string, mixed> $context
@param mixed $value
@param array<string, mixed> $parameters
@param string $viewContext

@return string
1760
public function renderValue(array $context, $value, array $parameters = [], ?string $viewContext = null): string
    {
        try {
            return $this->renderer->renderValue(
                $value,
                $this->getViewContext($context, $viewContext),
                $parameters
            );
        } catch (Throwable $t) {
            $message = sprintf(
                'Error rendering a value of type "%s"',
                is_object($value) ? get_class($value) : gettype($value)
            );

            $this->errorHandler->handleError($t, $message, ['object' => $value]);
        }

        return '';
    }
1096422
@Override
	public void render(final WComponent component, final RenderContext context) {
		PrintWriter out = ((WebXmlRenderContext) context).getWriter();

		// If we are debugging the layout, write markers so that the html
		// designer can see where templates start and end.
		boolean debugLayout = ConfigurationProperties.getDeveloperVelocityDebug();

		if (debugLayout) {
			String templateUrl = url;

			if (url == null && component instanceof AbstractWComponent) {
				templateUrl = ((AbstractWComponent) component).getTemplate();
			}

			out.println("<!-- Start " + templateUrl + " -->");
			paintXml(component, out);
			out.println("<!-- End   " + templateUrl + " -->");
		} else {
			paintXml(component, out);
		}
	}
287962
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
    {
        $value = $arguments['value'];
        if ($value === null) {
            $value = $renderChildrenClosure();
        }
        if (is_string($value) || (is_object($value) && method_exists($value, '__toString'))) {
            return strip_tags($value);
        }

        return $value;
    }
190437
public function render(array $arguments, $value = null)
    {
        return self::renderStatic(array('arguments' => $arguments, 'value' => $value), $this->buildRenderChildrenClosure(), $this->renderingContext);
    }
221051
private static function setViewContext($parentActionViewContext, $viewContext) {
        InternalHelper::setStaticPropertyValue('\\PhpMvc\\View', 'viewContext', $viewContext);
        InternalHelper::setStaticPropertyValue('\\PhpMvc\\Html', 'viewContext', $viewContext);
        InternalHelper::setStaticPropertyValue('\\PhpMvc\\Html', 'parentActionViewContext', $parentActionViewContext);
    }
1272830
public function render(string $view, array $templateVars = []): string
    {
        return $this->renderer->render($view, $templateVars);
    }
389848
protected function resolveValue($value, Mustache_Context $context)
    {
        if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) {
            return $this->mustache
                ->loadLambda((string) call_user_func($value))
                ->renderInternal($context);
        }

        return $value;
    }
1002336
public function render($context = null)
    {
        try {
            return $this->_render($context);
        } catch (InvalidArgumentException $e) {
            throw $e;
        } catch (RootException $e) {
            throw $this->_createTemplateRenderException($this->__('Could not render placeholder template'), null, $e, $this, $context);
        }
    }
1251642
protected function _beforeRender(ControllerContext $context)
    {
        $controller = $context->getSubject();

        // Add toolbars on authenticated requests only.
        if ($controller->getUser()->isAuthentic())
        {
            //Add the toolbars
            $toolbars = (array)ObjectConfig::unbox($this->getConfig()->toolbars);

            foreach ($toolbars as $key => $value)
            {
                if (is_numeric($key)) {
                    $this->addToolbar($value);
                } else {
                    $this->addToolbar($key, $value);
                }
            }
        }

        //Add the template filter and inject the toolbars
        if($controller->getView() instanceof ViewTemplatable) {
            $controller->getView()->getTemplate()->addFilter('toolbar', array('toolbars' => $this->getToolbars()));
        }
    }
482463
public function render($context = [])
    {
        $this->getRenderer()->setElement($this);
        return $this->getRenderer()->render($context);
    }
1262918
public function renderItem(array $context, CmsItemInterface $item, string $viewType, array $parameters = [], ?string $viewContext = null): string
    {
        try {
            return $this->renderer->renderValue(
                $item,
                $this->getViewContext($context, $viewContext),
                ['view_type' => $viewType] + $parameters
            );
        } catch (Throwable $t) {
            $message = sprintf(
                'Error rendering an item with value "%s" and value type "%s"',
                $item->getValue(),
                $item->getValueType()
            );

            $this->errorHandler->handleError($t, $message);
        }

        return '';
    }
387185
public function canRender(ControllerContext $controllerContext)
    {
        $this->setControllerContext($controllerContext);
        try {
            $this->getTemplateSource();
            return true;
        } catch (Exception\InvalidTemplateResourceException $e) {
            return false;
        }
    }
588580
protected function _actionRender(ViewContext $context)
    {
        $content = $context->content;

        if(is_string($content)) {
            $content = trim($content);
        }

        return $content;
    }
517440
public function renderActions($context = 'bottom')
    {
        $returnValue = (string) '';

		if(isset($this->actions[$context])){

			$decorator = null;
			if(!is_null($this->getDecorator('actions-'.$context))){
			 	$decorator = $this->getDecorator('actions-'.$context);
			}
			else if(!is_null($this->getDecorator('actions'))){
			 	$decorator = $this->getDecorator('actions');
			}

			if(!is_null($decorator)){
				$returnValue .= $decorator->preRender();
			}

			foreach($this->actions[$context] as $action){
				$returnValue .= $action->render();
			}

			if(!is_null($decorator)){
				$returnValue .= $decorator->postRender();
			}

		}



        return (string) $returnValue;
    }
167701
protected function _beforeRender(ControllerContext $context)
    {
        $controller = $context->getSubject();

        if (!$controller->isDispatched()) {
            $controller->loadLanguage();
        }
    }
429094
public static function execute($value, ContextInterface $context): array
    {
        assert(is_int($value) || is_string($value));

        $apiClass = $context->getProperties()->getProperty(static::PROPERTY_API_CLASS);

        /** @var FactoryInterface $apiFactory */
        $apiFactory = $context->getContainer()->get(FactoryInterface::class);

        /** @var CrudInterface $api */
        $api = $apiFactory->createApi($apiClass);

        $data   = $api->withIndexFilter((string)$value)->indexIdentities();
        $result = !empty($data);

        return $result === true ?
            static::createSuccessReply($value) :
            static::createErrorReply(
                $context,
                $value,
                ErrorCodes::EXIST_IN_DATABASE_SINGLE,
                Messages::EXIST_IN_DATABASE_SINGLE,
                []
            );
    }
509019
private function getRouteVars(RouteContextInterface $context, array $parameters)
    {
        return array_merge(
            array_combine(array_values($v = $context->getVars()), array_fill(1, count($v), null)),
            $parameters
        );
    }