renderTable example

$languages->map(fn (LanguageEntity $language) => $language->getName()),
                $currency->getName(),
                $currencies->map(fn (CurrencyEntity $currency) => $currency->getName()),
                $domains->map(fn (SalesChannelDomainEntity $domain) => $domain->getUrl()),
            ];
        }

        if ($input->getOption('output') === 'json') {
            return $this->renderJson($output$headers$data);
        }

        return $this->renderTable($output$headers$data);
    }

    private function renderJson(OutputInterface $output, array $headers, array $data): int
    {
        $json = [];

        foreach ($data as $row) {
            $jsonItem = [];
            foreach ($row as $item => $value) {
                $jsonItem[mb_strtolower((string) ($headers[$item] ?? $item))] = $value;
            }
            
Home | Imprint | This part of the site doesn't use cookies.