* ....
*
*
*
* @api
*/
class PublicPathViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @var boolean
*/
protected $escapeOutput = false;
protected static ?array $frontendGroupIds = null;
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('path', 'string', 'Extension resource path', true);
}
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
*
* @return bool
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
$path = (string)$arguments['path'];
return PathUtility::getPublicResourceWebPath($path);
}
}