Translations:Manual:Extension registration/76/en

Check, if an extension is loaded without actually require it
Many extension may provide features, which only works, if another extension is installed, too, without really needing this feature for the core extension function to work. As an example: If extension B is installed, extension A can provide a real WYSIWYG editor, otherwise it will use a simple textarea. Extension A can profit from extension B (if it is installed), but doesn't require it to be installed to work properly. For this, you generally check, if the extension is installed, rather than adding it as a hard dependency. In the PHP entry point structure you can do this by checking, if a specific class of extension B exists or not, e.g. using this code: