refactor(shop-statuses): migrate to DI, restructure docs into docs/ folder (0.268)
- Migrate ShopStatuses module to Domain + DI architecture - Add ShopStatusRepository, ShopStatusesController with color picker - Convert front\factory\ShopStatuses to facade - Add FormFieldType::COLOR with HTML5 color picker - Move documentation files to docs/ folder (PROJECT_STRUCTURE, REFACTORING_PLAN, CHANGELOG, FORM_EDIT_SYSTEM, TESTING, DATABASE_STRUCTURE) - Tests: 254 tests, 736 assertions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -268,6 +268,21 @@ class FormField
|
||||
);
|
||||
}
|
||||
|
||||
public static function color(string $name, array $config = []): self
|
||||
{
|
||||
return new self(
|
||||
$name,
|
||||
FormFieldType::COLOR,
|
||||
$config['label'] ?? '',
|
||||
$config['value'] ?? null,
|
||||
$config['tab'] ?? 'default',
|
||||
$config['required'] ?? false,
|
||||
$config['attributes'] ?? [],
|
||||
[],
|
||||
$config['help'] ?? null
|
||||
);
|
||||
}
|
||||
|
||||
public static function hidden(string $name, $value = null): self
|
||||
{
|
||||
return new self(
|
||||
|
||||
@@ -21,4 +21,5 @@ class FormFieldType
|
||||
public const HIDDEN = 'hidden';
|
||||
public const LANG_SECTION = 'lang_section';
|
||||
public const CUSTOM = 'custom';
|
||||
public const COLOR = 'color';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user