buildTableRows example

$rows[] = [$part];
                        }
                    }
                }
            }
        } else {
            $rows = array_merge($this->headers, [$divider]$this->rows);
        }

        $this->calculateNumberOfColumns($rows);

        $rowGroups = $this->buildTableRows($rows);
        $this->calculateColumnsWidth($rowGroups);

        $isHeader = !$horizontal;
        $isFirstRow = $horizontal;
        $hasTitle = (bool) $this->headerTitle;

        foreach ($rowGroups as $rowGroup) {
            $isHeaderSeparatorRendered = false;

            foreach ($rowGroup as $row) {
                if ($divider === $row) {
                    
// setting headers and column order         $tableHeaders = array_intersect_key([
            'own' => 'Options',
            'overridden' => 'Overridden options',
            'parent' => 'Parent options',
            'extension' => 'Extension options',
        ]$formOptions);

        $this->output->title(sprintf('%s (Block prefix: "%s")', $resolvedFormType->getInnerType()::class$resolvedFormType->getInnerType()->getBlockPrefix()));

        if ($formOptions) {
            $this->output->table($tableHeaders$this->buildTableRows($tableHeaders$formOptions));
        }

        if ($this->parents) {
            $this->output->section('Parent types');
            $this->output->listing(array_map($this->formatClassLink(...)$this->parents));
        }

        if ($this->extensions) {
            $this->output->section('Type extensions');
            $this->output->listing(array_map($this->formatClassLink(...)$this->extensions));
        }
    }
 elseif ('' !== $cell) {
                        $rows[] = [$cell];
                    }
                }
            }
        } else {
            $rows = array_merge($this->headers, [$divider]$this->rows);
        }

        $this->calculateNumberOfColumns($rows);

        $rowGroups = $this->buildTableRows($rows);
        $this->calculateColumnsWidth($rowGroups);

        $isHeader = !$horizontal;
        $isFirstRow = $horizontal;
        $hasTitle = (bool) $this->headerTitle;

        foreach ($rowGroups as $rowGroup) {
            $isHeaderSeparatorRendered = false;

            foreach ($rowGroup as $row) {
                if ($divider === $row) {
                    
$alternatives = $this->findAlternatives($shortname$shortnames);
                if (FilesystemLoader::MAIN_NAMESPACE !== $namespace) {
                    $alternatives = array_map(fn ($shortname) => '@'.$namespace.'/'.$shortname$alternatives);
                }
            }

            $this->error($iosprintf('Template name "%s" not found', $name)$alternatives);
        }

        $io->section('Configured Paths');
        if ($paths) {
            $io->table(['Namespace', 'Paths']$this->buildTableRows($paths));
        } else {
            $alternatives = [];
            $namespace = $this->parseTemplateName($name)[0];

            if (FilesystemLoader::MAIN_NAMESPACE === $namespace) {
                $message = 'No template paths configured for your application';
            } else {
                $message = sprintf('No template paths configured for "@%s" namespace', $namespace);
                foreach ($this->getFilesystemLoaders() as $loader) {
                    $namespaces = $loader->getNamespaces();
                    foreach ($this->findAlternatives($namespace$namespaces) as $namespace) {
                        
Home | Imprint | This part of the site doesn't use cookies.