public function SampleCsv::content in Bulk User Registration 8
Provides a response with downloadable CSV file data.
1 string reference to 'SampleCsv::content'
File
- src/
Controller/ SampleCsv.php, line 18
Class
- SampleCsv
- Sample CSV controller.
Namespace
Drupal\bulk_user_registration\ControllerCode
public function content() {
$response = new Response();
$response
->setContent($this
->getCsvData());
$response->headers
->set('Content-Type', 'text/csv');
$response->headers
->set('Content-Disposition', 'attachment; filename="bulk-user-registration-sample.csv"');
return $response;
}