for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* TitleTagViewHelper.
*/
declare(strict_types=1);
namespace HDNET\Calendarize\ViewHelpers;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
*
* @see https://github.com/georgringer/news/blob/master/Classes/ViewHelpers/TitleTagViewHelper.php
class TitleTagViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
$content = \trim($renderChildrenClosure());
if (!empty($content)) {
$GLOBALS['TSFE']->altPageTitle = $content;
$GLOBALS['TSFE']->indexedDocTitle = $content;
}
return '';