public function respondFromContent($content = '', $status_code = ELGG_HTTP_OK, array $headers = []) { if ($this->ajax->isReady()) { $hook_type = $this->parseContext(); // $this->ajax->setStatusCode($status_code); return $this->send($this->ajax->respondFromOutput($content, $hook_type)); } return $this->send($this->prepareResponse($content, $status_code, $headers)); }