FluidTYPO3\Vhs\ViewHelpers\Variable\TyposcriptViewHelper::render PHP Method

render() public method

Render
public render ( string $path = null ) : mixed
$path string
return mixed
    public function render($path = null)
    {
        if (null === $path) {
            $path = $this->renderChildren();
        }
        if (true === empty($path)) {
            return null;
        }
        $all = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
        $segments = explode('.', $path);
        $value = $all;
        foreach ($segments as $path) {
            $value = true === isset($value[$path . '.']) ? $value[$path . '.'] : $value[$path];
        }
        if (true === is_array($value)) {
            $value = GeneralUtility::removeDotsFromTS($value);
        }
        return $value;
    }