ew_base/Classes/User/AssetPath.php
2024-05-25 16:24:24 +02:00

34 lines
938 B
PHP
Executable File

<?php
declare(strict_types=1);
/*
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/
namespace Evoweb\EwBase\User;
use TYPO3\CMS\Core\Utility\PathUtility;
/**
* EXAMPLE:
* page.headerData.10 = USER
* page.headerData.10.userFunc = Evoweb\EwBase\User\AssetPath->getAbsolutePublicPath
* page.headerData.10.file = EXT:site_package/Resources/Public/manifest.json
* page.headerData.10.stdWrap.wrap = <link rel="manifest" href="|"/>
*/
class AssetPath
{
public function getAbsolutePublicPath(string $content, array $conf): string
{
return $content . PathUtility::getAbsoluteWebPath($conf['file']);
}
}