public function __construct(PluginHooksService $hooks, SystemMessagesService $msgs, Input $input, Config $amdConfig)
{
$this->hooks = $hooks;
$this->msgs = $msgs;
$this->input = $input;
$this->amd_config = $amdConfig;
if ($this->input->get('elgg_fetch_messages', true)) {
$message_filter = [$this, 'appendMessages'];
$this->hooks->registerHandler(AjaxResponse::RESPONSE_HOOK, 'all', $message_filter, 999);
}
if ($this->input->get('elgg_fetch_deps', true)) {
$deps_filter = [$this, 'appendDeps'];
$this->hooks->registerHandler(AjaxResponse::RESPONSE_HOOK, 'all', $deps_filter, 999);
}
}