2 namespace TYPO3\CMS\Documentation\Utility;
32 $_EXTKEY = $extensionKey;
35 include($extPath .
'ext_emconf.php');
37 $release =
$EM_CONF[$_EXTKEY][
'version'];
38 list($major, $minor, $_) = explode(
'.', $release, 3);
39 if (($pos = strpos($minor,
'-')) !==
false) {
41 $minor = substr($minor, 0, $pos);
43 $EM_CONF[$_EXTKEY][
'version'] = $major .
'.' . $minor;
44 $EM_CONF[$_EXTKEY][
'release'] = $release;
45 $EM_CONF[$_EXTKEY][
'extensionKey'] = $extensionKey;
56 public static function getIcon($documentKey)
58 $basePath =
'typo3conf/Documentation/';
59 $documentPath = $basePath . $documentKey .
'/';
64 if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($documentKey,
'typo3cms.extensions.')) {
66 $extensionKey = substr($documentKey, 20);
72 }
elseif (is_file(PATH_site . $documentPath .
'icon.png')) {
73 $icon = $documentPath .
'icon.png';
74 }
elseif (is_file(PATH_site . $documentPath .
'icon.gif')) {
75 $icon = $documentPath .
'icon.gif';