Replies: 1 comment 1 reply
-
Hello, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am in the process to cleanup the code of my extensions to fit the requirements for the joomla4 API.
Unfortunately there are no migration documentations available to support this effort. I also could not find any references or
implementations with the current joomla4 code. If you look into this code you will find mostly the use of deprecated (old) methods. Also searching the web did not help either. Would be great if someone could help with some hints - especially with these three topics below:
1. Create a controller instance:
$controller = BaseController::getInstance('my-extension');
The Hint for the deprecated "getInstance" is:
Joomla\CMS\MVC\Controller\BaseController::getInstance(string $prefix, array $config=[]) : static
Deprecated. 5.0 Get the controller through the MVCFactory instead
There are no docs nor any samples how to create my controller via MVCFactory
2. add an includepath
HTMLHelper::addIncludePath(JPATH_COMPONENT . '/helpers/html');
hint for for the deprecated "addIncludePath" is:
Joomla\CMS\HTML\HTMLHelper::addIncludePath(string $path='') : array
Deprecated. 5.0 Use the service registry instead
There are no docs nor any samples how to use the service registry to define my htmlhelper include path
Get an table instance:
Table::getInstance($type, $prefix, $config);
hint for for the deprecated "getInstance" is:
Joomla\CMS\Table\Table::getInstance(string $type, string $prefix='JTable', array $config=[]) : Table|boolean
Deprecated. 5.0 Use the MvcFactory instead
There are no docs nor any samples how to use MvcFactory instead of getInstance
Many thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions