/** * Get the response content type. * * @return string */ public function getContentType() { if ($this->hasValidCallback()) { return 'application/javascript'; } return parent::getContentType(); }