public function render()
{
if (false === is_object($GLOBALS['TSFE']->sys_page)) {
return null;
}
$this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
$this->tagName = $this->arguments['tagName'];
// to set the tagName we should call initialize()
$this->initialize();
$this->languageMenu = $this->parseLanguageMenu();
$this->templateVariableContainer->add($this->arguments['as'], $this->languageMenu);
$content = $this->renderChildren();
$this->templateVariableContainer->remove($this->arguments['as']);
if (0 === strlen(trim($content))) {
$content = $this->autoRender();
}
return $content;
}