I started a component com_xxx_yyy in Joomla 4 from scratch to learn the new API the hard way.
Parts of the structure
- Controller --- DisplayController.php --- YyyController.php - View --- Yyy ------ HtmlView.php --- Yyys ------ HtmlView.php
In Yyys/HtmlView.php I add a toolbar button
then Joomla 4 uses the
YyyController.php but uses the component name
If I change the button to
$toolbar->addNew('xxx_yyy.new') then it uses the right component name
option=com_xxx_yyy but wants the Controller be called
The most examples I found where the trivial default way. I looked into Joomla! Docu and the boilerplate on github.
In Joomla! 3 you could to such naming mappings in the xxx_xxx.php or the controller.php, but both not existing in Joomla! 4.
I looked into com_content and there it is exactly how I want. view articles adds a button article.new and then it loads option=com_content;view=article
But I don't see the missing point on my side.