---
title: "Ajax mit eID: Alternative zu TYPO3\\CMS\\Core\\Http\\AjaxRequestHandler"
url: "https://www.typo3.net/d/126457-ajax-mit-eid-alternative-zu-typo3cmscorehttpajaxrequesthandler"
source: "typo3.net"
tags: ["Extensions","Entwicklung","Frage","TYPO3 8"]
created: "2017-12-07"
last_reply: "2017-12-18"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Ajax mit eID: Alternative zu TYPO3\CMS\Core\Http\AjaxRequestHandler

Extensions › Entwicklung · 1 Antwort · gestartet 2017-12-07

## Eröffnungsbeitrag

**getit** · 2017-12-07 · [Beitrag #1](https://www.typo3.net/d/126457-ajax-mit-eid-alternative-zu-typo3cmscorehttpajaxrequesthandler/1)

Ich habe in der Datei 'ext_localconf.php' folgendermaßen ein AJAX-Request registriert.

```php
$GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['kkbaybwBackendImageInWYSIWIG'] = [
	'callbackMethod' => 'KKSoftware\\Kkbaybw\\Controller\\BaseController->imageUploadInWYSIWIG'
];
```

Und im 'BaseController' die Fkt. 'imageUploadInWYSIWIG' geschrieben.

```php
public function imageUploadInWYSIWIG($params = [], TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = null) {
    	$postData = GeneralUtility::_POST();
  ...

  $ajaxObj->addContent('path', $path);
	
}
```

Der 'AjaxRequestHandler' ist aber als deprecated markiert und wird mit v9 entfernt.
Was soll ich dann als Alternative verwenden?

## Antworten

### [#2](https://www.typo3.net/d/126457-ajax-mit-eid-alternative-zu-typo3cmscorehttpajaxrequesthandler/2) · getit · 2017-12-18

Habe etwas rumprobiert und eine Lösung gefunden.

Alles wie bisher.

ext_localconf.php

```php
$GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['kkbaybwBackendImageInWYSIWIG'] = [
'callbackMethod' => 'KKSoftware\\Kkbaybw\\Controller\\BaseController->imageUploadInWYSIWIG'
];
```

BaseController::imageUploadInWYSIWIG()

```php
public function imageUploadInWYSIWIG() {
   ...
   echo json_encode(['parameter' => $value]);
}
```

Also hier einfach die Funktionsargumente weglassen.

---

Quelle: „Ajax mit eID: Alternative zu TYPO3\CMS\Core\Http\AjaxRequestHandler“, typo3.net, https://www.typo3.net/d/126457-ajax-mit-eid-alternative-zu-typo3cmscorehttpajaxrequesthandler
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
