PHP code example of inspiredminds / contao-isotope-pdf-templates
1. Go to this page and download the library: Download inspiredminds/contao-isotope-pdf-templates library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inspiredminds / contao-isotope-pdf-templates example snippets
// src/EventListener/ModifyPdfEventListener.php
namespace App\EventListener;
use InspiredMinds\ContaoIsotopePdfTemplatesBundle\Event\ModifyPdfEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener(ModifyPdfEvent::EVENT_NAME)]
class ModifyPdfEventListener
{
public function __invoke(ModifyPdfEvent $event): void
{
// Access the mPDF object instance
$mpdf = $event->getPdf();
// Access the Isotope Document instance
$document = $event->getDocument();
}
}