Cms\Classes\Controller\HasAjaxRequests


Public Methods

public getAjaxHandler()

public getAjaxHandler(): string 

getAjaxHandler returns the AJAX handler for the current request, if available.

public runAjaxHandlerAsResponse()

public runAjaxHandlerAsResponse($handler): void

runAjaxHandlerResponse is used by the ajaxHandler Twig function.

Protected Methods

protected execAjaxHandlers()

protected execAjaxHandlers(): mixed 

execAjaxHandlers executes the page, layout, component and plugin AJAX handlers.

protected execPostbackHandler()

protected execPostbackHandler(): void

execPostbackHandler is used internally to execute a postback version of an AJAX handler. This process fails without any exceptions to keep the page cycle going.

protected getAjaxHandlerPartialList()

protected getAjaxHandlerPartialList(): array 

protected getAjaxPartialName()

protected getAjaxPartialName(): void

getAjaxPartialName returns a partial name or true

protected runAjaxHandler()

protected runAjaxHandler($handler): void

runAjaxHandler tries to find and run an AJAX handler in the page, layout, components and plugins. The method stops as soon as the handler is found. It will return the response from the handler, or true if the handler was found. Returns false otherwise.

protected runPageCapture()

protected runPageCapture($page, $ajaxPartial): void

runPageCapture captures partial output and runs AJAX handlers in partials if they are seen