insertRange example

$subscriber = new GenerateDocumentAction($this->documentGenerator, $this->logger);

        $config = [
            'documentType' => 'customDoc',
            'documentRangerType' => 'document_example',
            'custom' => [
                'invoiceNumber' => '1100',
            ],
        ];

        $this->insertCustomDocument();
        $this->insertRange();

        $registry = $this->getContainer()->get(DocumentRendererRegistry::class);
        $customDocGenerator = new CustomDocRenderer();
        $class = new \ReflectionClass($registry);
        $property = $class->getProperty('documentRenderers');
        $property->setAccessible(true);
        $oldValue = $property->getValue($registry);
        $property->setValue(
            $registry,
            [$customDocGenerator]
        );

        
Home | Imprint | This part of the site doesn't use cookies.