public function YamlFormController::javascript in YAML Form 8
Returns a form's JavaScript.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
\Drupal\yamlform\YamlFormInterface $yamlform: The form.
Return value
\Symfony\Component\HttpFoundation\Response The response object.
1 string reference to 'YamlFormController::javascript'
File
- src/
Controller/ YamlFormController.php, line 87
Class
- YamlFormController
- Provides route responses for form.
Namespace
Drupal\yamlform\ControllerCode
public function javascript(Request $request, YamlFormInterface $yamlform) {
return new Response($yamlform
->getJavaScript(), 200, [
'Content-Type' => 'text/javascript',
]);
}