Joomla Asked by Exprove on December 26, 2020
I am trying to migrating old classes names to the new ones available on classmap.php
However after renaming the classes I am having these errors:
Class 'Text' not found //JText works
Class 'BaseController' not found //JControllerLegacy works
I am new to joomla but for my understanding I only need joomla 3.x, which I am running.
Am I missing some import?
You need to specify the namespace before you use them, so for your examples above:
use JoomlaCMSLanguageText;
use JoomlaCMSMVCControllerBaseController;
class YourClass extends BaseController {
echo Text::_('YOUR_CONSTANT');
}
Otherwise, you can do it like this, which is going to get tedious pretty quick:
class YourClass extends JoomlaCMSMVCControllerBaseController {
echo JoomlaCMSLanguageText::_('YOUR_CONSTANT');
}
Answered by Grant G on December 26, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP