Loading code/generator/config.php +1 −1 Changes for code/generator/config.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ return [ ], 'name' => [ 'label' => 'Nom ou alias pour y accéder', 'value' => 'nom', 'value' => null, ], 'generator' => function (array $params): array { $class = $params['class']; Loading code/generator/factory.php +15 −0 Changes for code/generator/factory.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,21 @@ use UnicaenCode\Util; return [ 'title' => 'Création d\'une nouvelle factory', 'class' => [ 'label' => 'Classe de l\'entité visée', 'value' => 'Application\Service\ExempleService', ], 'type' => [ 'type' => 'text', 'label' => 'Type de classe', 'value' => true, ], 'subDir' => [ 'type' => 'checkbox', 'label' => 'La factory sera placée dans un sous-dossier dédié', 'value' => false, ], 'generator' => function (array $params): array { $class = $params['class'] ?? null; $template = $params['template'] ?? 'Factory'; Loading src/Service/CodeGeneratorService.php +3 −0 Changes for src/Service/CodeGeneratorService.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -438,6 +438,9 @@ class CodeGeneratorService $expanded = $params['expanded'] ?? true; $filename = $params['filename'] ?? 'Code source (fichier sans nom)'; $code = $params['code'] ?? null; if (!$code) return $this; $write = $params['write'] ?? true; $id = uniqid('bloc_code_'); Loading Loading
code/generator/config.php +1 −1 Changes for code/generator/config.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ return [ ], 'name' => [ 'label' => 'Nom ou alias pour y accéder', 'value' => 'nom', 'value' => null, ], 'generator' => function (array $params): array { $class = $params['class']; Loading
code/generator/factory.php +15 −0 Changes for code/generator/factory.php: 15 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,21 @@ use UnicaenCode\Util; return [ 'title' => 'Création d\'une nouvelle factory', 'class' => [ 'label' => 'Classe de l\'entité visée', 'value' => 'Application\Service\ExempleService', ], 'type' => [ 'type' => 'text', 'label' => 'Type de classe', 'value' => true, ], 'subDir' => [ 'type' => 'checkbox', 'label' => 'La factory sera placée dans un sous-dossier dédié', 'value' => false, ], 'generator' => function (array $params): array { $class = $params['class'] ?? null; $template = $params['template'] ?? 'Factory'; Loading
src/Service/CodeGeneratorService.php +3 −0 Changes for src/Service/CodeGeneratorService.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -438,6 +438,9 @@ class CodeGeneratorService $expanded = $params['expanded'] ?? true; $filename = $params['filename'] ?? 'Code source (fichier sans nom)'; $code = $params['code'] ?? null; if (!$code) return $this; $write = $params['write'] ?? true; $id = uniqid('bloc_code_'); Loading