Phase 6 zamknięta po 2 planach. Pełny fundament dla Phase 7-13 (migracja 17 admin controllers do Admin\ namespace). 06-01 (Forms infrastructure): - Admin\ViewModels\Forms\* — 5 ViewModeli (687 L) - Admin\Validation\FormValidator (196 L) - composer.json: php >=7.4, PSR-4 paths cross-platform safe (Admin\ → autoload/admin/, Frontend\ → autoload/front/) 06-02 (Support layer): - Admin\Support\TableListRequestFactory (99 L) — parser list z $_GET - Admin\Support\Forms\FormRequestHandler (159 L) — POST + CSRF + walidacja + persist - Admin\Support\Forms\FormFieldRenderer (494 L) — renderer HTML pól Decyzje: - Brak BaseController — Phase 7+ kontrolery jako POJOs z DI (jak shopPRO) - PSR-4 filename fix: TableListRequestFactory.php (bez shopPRO 'class.' prefix) - PascalCase namespace (Admin\Support) na lowercase folder admin/ ze względu na Windows fs case-insensitivity vs legacy admin/controls/ Pliki: 8 nowych klas, 1635 L kodu PHP 7.4-kompatybilnego, zero regresji. Smoke test: walidacja e-maila zwraca PL komunikat, factory parsuje ?page=&per_page=&sort=&filter=, Domain/Shared nadal ładują się. PHPUnit: 37/37 OK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
32 lines
774 B
PHP
32 lines
774 B
PHP
<?php
|
|
namespace Admin\ViewModels\Forms;
|
|
|
|
/**
|
|
* Definicja zakładki formularza
|
|
*/
|
|
class FormTab
|
|
{
|
|
public string $id;
|
|
public string $label;
|
|
public string $icon;
|
|
public ?string $parentTabId;
|
|
|
|
/**
|
|
* @param string $id Unikalny identyfikator zakładki
|
|
* @param string $label Etykieta wyświetlana
|
|
* @param string $icon Klasa FontAwesome (np. 'fa-wrench')
|
|
* @param string|null $parentTabId Identyfikator zakładki nadrzędnej (dla zagnieżdżenia)
|
|
*/
|
|
public function __construct(
|
|
string $id,
|
|
string $label,
|
|
string $icon = '',
|
|
?string $parentTabId = null
|
|
) {
|
|
$this->id = $id;
|
|
$this->label = $label;
|
|
$this->icon = $icon;
|
|
$this->parentTabId = $parentTabId;
|
|
}
|
|
}
|