public function render()
{
$filePath = $this->arguments['file'];
if (true === empty($filePath)) {
$filePath = $this->renderChildren();
if (null === $filePath) {
return '';
}
}
$file = GeneralUtility::getFileAbsFileName($filePath);
$parts = explode('.', basename($file));
// file has no extension
if (1 === count($parts)) {
return '';
}
$extension = strtolower(array_pop($parts));
return $extension;
}