In my controller of my component, i want to load the model : PluginModel from Joomla\Component\Plugins\Administrator\Model\PluginModel;
In my controller the getModel method return just false, this is my controller :
use Joomla\CMS\MVC\Controller\AdminController;
class PluginsController extends AdminController
{
public function __construct($config = [])
{
parent::__construct($config);
}
public function publish()
{
$model = $this->getModel();
}
public function getModel($name = 'Plugin', $prefix = 'Administrator', $config = ['ignore_request' => true])
{
return parent::getModel($name, $prefix, $config);
}
}
By using this way it works on J!3.9.x but on J!4.0, the $model = $this->getModel(); just return false
How to load the model ?