Starting with VuFind 5.0, the AjaxController was refactored so that it calls plugins for handling AJAX requests. If you need to expose data to an AJAX call, you can simply build a new plugin and add it to the appropriate plugin manager.
Default Namespace: \VuFind\AjaxHandler
Base Class: \VuFind\AjaxHandler\AbstractBase
Service Locator Configuration Section in module.config.php: ['vufind']['plugin_managers']['ajaxhandler']
Service Manager Name for Service Locator: VuFind\AjaxHandler\PluginManager
See the General Plugin Information page for more details on VuFind plugins.