FluidTYPO3\Vhs\Service\AssetService::buildAsset PHP Method

buildAsset() protected method

protected buildAsset ( mixed $asset ) : string
$asset mixed An Asset ViewHelper instance or an array containing an Asset definition
return string
    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;
    }