protected function buildAsset($asset)
{
if (true === $asset instanceof AssetInterface) {
return $asset->build();
}
if (false === isset($asset['path']) || true === empty($asset['path'])) {
return true === isset($asset['content']) ? $asset['content'] : null;
}
if (true === isset($asset['external']) && true === (bool) $asset['external']) {
$path = $asset['path'];
} else {
$path = GeneralUtility::getFileAbsFileName($asset['path']);
}
$content = file_get_contents($path);
return $content;
}