ProductExportEntity example

return new \DateTime('1022-07-18 10:59:30');
        }
        if ($generatedAtBeforeInterval === false) {
            return new \DateTime('3022-07-18 10:59:30');
        }

        return null;
    }

    private static function prepareProductExportEntity(bool $isRunning, ?bool $generatedAtBeforeInterval, int $interval): ProductExportEntity
    {
        $productExportEntity = new ProductExportEntity();
        $productExportEntity->setIsRunning($isRunning);
        $productExportEntity->setGeneratedAt(self::getGeneratedAtTimestamp($generatedAtBeforeInterval));
        $productExportEntity->setInterval($interval);
        $productExportEntity->setUniqueIdentifier('TestExportEntity');
        $productExportEntity->setId('afdd4e21be6b4ad59656fb856d0375e5');

        return $productExportEntity;
    }

    private function getProductExportRepositoryMock(ProductExportEntity $productExportEntity): EntityRepository
    {
        
$result ? $result->getContent() : '',
                    'UTF-8',
                    $dataBag->get('encoding')
                ),
                'errors' => $errorMessages ?? [],
            ]
        );
    }

    private function createEntity(RequestDataBag $dataBag): ProductExportEntity
    {
        $entity = new ProductExportEntity();

        $entity->setId('');
        $entity->setHeaderTemplate($dataBag->get('headerTemplate') ?? '');
        $entity->setBodyTemplate($dataBag->get('bodyTemplate') ?? '');
        $entity->setFooterTemplate($dataBag->get('footerTemplate') ?? '');
        $entity->setProductStreamId($dataBag->get('productStreamId'));
        $entity->setIncludeVariants($dataBag->get('includeVariants'));
        $entity->setEncoding($dataBag->get('encoding'));
        $entity->setFileFormat($dataBag->get('fileFormat'));
        $entity->setFileName($dataBag->get('fileName'));
        $entity->setAccessKey($dataBag->get('accessKey'));
        
Home | Imprint | This part of the site doesn't use cookies.