| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Ui\Form\Layout\Section; |
| 6: | |
| 7: | use Atk4\Ui\Columns as UiColumns; |
| 8: | use Atk4\Ui\Form; |
| 9: | |
| 10: | /** |
| 11: | * Represents form controls in columns. |
| 12: | */ |
| 13: | class Columns extends UiColumns |
| 14: | { |
| 15: | /** @var class-string<Form\Layout> */ |
| 16: | public $formLayout = Form\Layout::class; |
| 17: | |
| 18: | public Form $form; |
| 19: | |
| 20: | /** |
| 21: | * @return Form\Layout |
| 22: | */ |
| 23: | #[\Override] |
| 24: | public function addColumn($defaults = []) |
| 25: | { |
| 26: | $column = parent::addColumn($defaults); |
| 27: | |
| 28: | return $column->add([$this->formLayout, 'form' => $this->form]); // @phpstan-ignore-line |
| 29: | } |
| 30: | } |
| 31: |