In TYPO3 before 8.7 it was common to use something like
[userFunc = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('felogin')]
to check whether the extension "felogin" is installed or not (example taken from the css_styled_content
former system extension).
In TYPO3 v9.5, i think, the SEL (Symfony Expression Language) was introduced and in v10.4 became mandatory. In the documentation I see no way to express the aforementioned condition in SEL, except by creating a custom function.
Is a custom function really the only way? Do I have to implement 2 PHP classes (to get the custom function runnning) instead of that one line now? Or has the paradigm shifted so I should not need to check for installed extensions? What is the idea here?
It makes little sense to have settings in a concrete instance dependent on installed extensions - either they are required (and therefore present), or not.
The conditions only make sense if this package/TypoScript is used in different projects (like a general sitepackage in some agencies, or like bootstrap_package).
If you really need such a condition, you have to extend TYPO3 by a custom function, as you already wrote (-> Extending the ExpressionLanguage in TYPO3).