Joomla4/5 how know if the current extension is in legacy mode

31 views
Skip to first unread message

roland_d_alsace

unread,
Feb 27, 2024, 5:54:28 AMFeb 27
to Joomla! General Development
Hi.

On Joomla4 or 5, is it possible to know if the extension being executed is in legacy mode (MVC Joomla3), or should we check the presence of the /services/provider.php file (with is_file(...)) ?

roland_d_alsace

unread,
Feb 27, 2024, 9:03:56 AMFeb 27
to Joomla! General Development
I have found :

if (Factory::getApplication()->bootComponent($extension)->getMVCFactory() instanceof \Joomla\CMS\MVC\Factory\LegacyFactory){
....
Reply all
Reply to author
Forward
0 new messages