Migración completa a Clean Architecture con componentes funcionales
- Reorganización de estructura: Admin/, Public/, Shared/, Schemas/ - 12 componentes migrados: TopNotificationBar, Navbar, CtaLetsTalk, Hero, FeaturedImage, TableOfContents, CtaBoxSidebar, SocialShare, CtaPost, RelatedPost, ContactForm, Footer - Panel de administración con tabs Bootstrap 5 funcionales - Schemas JSON para configuración de componentes - Renderers dinámicos con CSSGeneratorService (cero CSS hardcodeado) - FormBuilders para UI admin con Design System consistente - Fix: Bootstrap JS cargado en header para tabs funcionales - Fix: buildTextInput maneja valores mixed (bool/string) - Eliminación de estructura legacy (src/, admin/, assets/css/componente-*) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Application\UseCases\DeleteComponent;
|
||||
|
||||
/**
|
||||
* DeleteComponentResponse - DTO de respuesta para eliminación
|
||||
*
|
||||
* @package ROITheme\Shared\Application\UseCases\DeleteComponent
|
||||
*/
|
||||
final readonly class DeleteComponentResponse
|
||||
{
|
||||
private function __construct(
|
||||
private bool $success,
|
||||
private ?string $message,
|
||||
private ?string $error
|
||||
) {}
|
||||
|
||||
public function isSuccess(): bool
|
||||
{
|
||||
return $this->success;
|
||||
}
|
||||
|
||||
public function getMessage(): ?string
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
public function getError(): ?string
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
public static function success(string $message): self
|
||||
{
|
||||
return new self(true, $message, null);
|
||||
}
|
||||
|
||||
public static function failure(string $error): self
|
||||
{
|
||||
return new self(false, null, $error);
|
||||
}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'success' => $this->success,
|
||||
'message' => $this->message,
|
||||
'error' => $this->error
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user