public function EventSubscriber::requireDompdf in Opigno certificate 8
Same name and namespace in other branches
- 3.x src/EventSubscriber/EventSubscriber.php \Drupal\opigno_certificate\EventSubscriber\EventSubscriber::requireDompdf()
Loads dompdf.
File
- src/
EventSubscriber/ EventSubscriber.php, line 50
Class
- EventSubscriber
- Class EventSubscriber.
Namespace
Drupal\opigno_certificate\EventSubscriberCode
public function requireDompdf(GetResponseEvent $event) {
$dompdf_autoloaders = [
'libraries/dompdf/src/Autoloader.php',
'profiles/opigno_lms/libraries/dompdf/src/Autoloader.php',
];
foreach ($dompdf_autoloaders as $dompdf_autoloader) {
if (file_exists($dompdf_autoloader)) {
// Load dompdf for the entity_print.
require_once $dompdf_autoloader;
Autoloader::register();
break;
}
}
}