Bug #22553 » 14258-v2.diff
t3lib/class.t3lib_extmgm.php (working copy) | ||
---|---|---|
***************************************/
|
||
/**
|
||
* Checks whether the extension with extension key $key is installed.
|
||
*
|
||
* @param string $key key of the extension to test, must not be empty
|
||
* @param boolean $exceptionIfNotLoaded
|
||
* whether an exception should be thrown if the extension is not
|
||
* loaded
|
||
*
|
||
* @return boolean TRUE if the extension is loaded, FALSE otherwise
|
||
*/
|
||
public static function isInstalled($key, $exceptionIfNotLoaded = FALSE) {
|
||
$isInstalled = t3lib_div::inList(
|
||
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'], $key
|
||
);
|
||
if (!$isInstalled && $exceptionIfNotLoaded) {
|
||
throw new BadFunctionCallException(
|
||
'TYPO3 Fatal Error: Extension "' . $key . '" was not installed!',
|
||
1272625953
|
||
);
|
||
}
|
||
return $isInstalled;
|
||
}
|
||
/**
|
||
* Returns true if the extension with extension key $key is loaded.
|
||
* Usage: 109
|
||
*
|
- « Previous
- 1
- 2
- Next »