for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Qbus\Qbtools\ViewHelpers;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
/**
* CacheTagViewHelper
*
* @author Benjamin Franzke <[email protected]>
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
class CacheTagViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
* Initialize arguments
public function initializeArguments()
$this->registerArgument('tag', 'string', '', true);
}
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
$tag = $arguments['tag'];
$GLOBALS['TSFE']->addCacheTags([$tag]);
return '';