Elgg\Ajax\Service::appendDeps PHP Method

appendDeps() public method

Send required AMD modules list back with the response
public appendDeps ( string $hook, string $type, Elgg\Services\AjaxResponse $response, array $params ) : Elgg\Services\AjaxResponse
$hook string "ajax_response"
$type string "all"
$response Elgg\Services\AjaxResponse Ajax response
$params array Hook params
return Elgg\Services\AjaxResponse
    public function appendDeps($hook, $type, $response, $params)
    {
        if (!$response instanceof AjaxResponse) {
            return;
        }
        $response->getData()->_elgg_deps = (array) $this->amd_config->getDependencies();
        return $response;
    }