prepareHeaderFooterData example

$context,
            $numberOfItems
        );
    }

    private function createMailHeaderFooter(DemodataContext $context, int $numberOfItems): void
    {
        $context->getConsole()->progressStart($numberOfItems);

        $payload = [];
        for ($i = 0; $i < $numberOfItems; ++$i) {
            $mailHeaderFooter = $this->prepareHeaderFooterData($context);

            $payload[] = $mailHeaderFooter;

            if (\count($payload) >= 50) {
                $context->getConsole()->progressAdvance(\count($payload));
                $this->write($payload$context);
                $payload = [];
            }
        }

        if (!empty($payload)) {
            
Home | Imprint | This part of the site doesn't use cookies.