public function TestPrintEngine::send in Entity Print 8.2
Send the Print contents to the browser.
Parameters
string $filename: The filename if we want to force the browser to download.
bool $force_download: TRUE to attempt to force the browser to download the PDF otherwise FALSE.
Throws
\Drupal\entity_print\PrintEngineException Thrown when Print generation fails.
Overrides PrintEngineInterface::send
File
- tests/
modules/ entity_print_test/ src/ Plugin/ EntityPrint/ PrintEngine/ TestPrintEngine.php, line 29
Class
- TestPrintEngine
- A test print engine plugin.
Namespace
Drupal\entity_print_test\Plugin\EntityPrint\PrintEngineCode
public function send($filename, $force_download = TRUE) {
echo $filename;
// Echo the response and then flush, just like a Print implementation would.
echo 'Using testprintengine - ' . $this->configuration['test_engine_suffix'];
echo $this->html;
}