In my Configuration\TCA\Overrides\tx_news_domain_model.php I add option to select field like this:
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['switchableControllerActions']['newItems']['News->gallery'] = 'Gallery view';
In my ext_localconf.php
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['classes']['Controller/NewsController'][] = 'news_extender';
In my extension
namespace Vendor\NewsExtender\Controller\NewsController;
class NewsController extends \GeorgRinger\News\Controller\NewsContoller {
public function galleryAction()
{
...
}
}
I get an error: An action "galleryAction" does not exist in controller "GeorgRinger\News\Controller\NewsController" So my guess is no override of actual NewsController happens.
My question is if it is possible to add new action to the controller the way I do (['Controller/NewsController'][]
)? If not, can I achieve this other way? If so provide an example.