Hallo zusammen!
Ich habe meinen AjaxController in der ext_tabels.php registriert:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler('AjaxController::show','\MyVendor\MyExt\Controller\AjaxController->show');
Die Klasse wird auch richtig aufgerufen
class AjaxController {
/**
* wochenplanRepository
*
* @var\MyVendor\MyExt\Domain\Repository\PlanRepository
* @inject
*/
protected $planRepository= NULL;
/**
* action showWeek
*
* @return void
*/
public function showWeekAction($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj = NULL) {
$elements = $_POST;
#$result = $this->planRepository->getWpElements($elements['year'], $elements['kw']);
$ajaxObj->addContent('opendocsMenu', json_encode(array("test"=>'123')));
#echo json_encode($result);
#die("ttt");
}
}
Wieso kann ich nicht auf mein Pepository zugreifen!??
Ich bekomme dann nichts als Rückmeldung. Nicht mal einen Fehler... :-(
Irgendwelche Ideen!?? 🙂
LG - Simon