Loading src/UnicaenRenderer/Controller/IndexControllerFactory.php +0 −4 Original line number Diff line number Diff line Loading @@ -7,10 +7,6 @@ use Interop\Container\ContainerInterface; class IndexControllerFactory { /** * @param ContainerInterface $container * @return IndexController */ public function __invoke(ContainerInterface $container): IndexController { $controller = new IndexController(); Loading src/UnicaenRenderer/Form/Macro/MacroForm.php +6 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class MacroForm extends Form { use ProvidesObjectManager; public function init() public function init(): void { // code $this->add([ Loading @@ -45,7 +45,8 @@ class MacroForm extends Form 'type' => Text::class, 'name' => 'variable', 'options' => [ 'label' => "Variable associée * :", 'label' => "Variable associée <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'variable', Loading @@ -56,7 +57,8 @@ class MacroForm extends Form 'type' => Text::class, 'name' => 'methode', 'options' => [ 'label' => "Méthode associée * :", 'label' => "Méthode associée <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'methode', Loading Loading @@ -114,7 +116,7 @@ class MacroForm extends Form ])); } public function setOldCode($value) public function setOldCode($value): void { $this->get('old-code')->setValue($value); } Loading src/UnicaenRenderer/Form/Macro/MacroFormFactory.php +0 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,6 @@ class MacroFormFactory { /** * @param ContainerInterface $container * @return MacroForm * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ Loading src/UnicaenRenderer/Form/Macro/MacroHydrator.php +2 −9 Original line number Diff line number Diff line Loading @@ -7,12 +7,9 @@ use UnicaenRenderer\Entity\Db\Macro; class MacroHydrator implements HydratorInterface { /** * @param Macro $object * @return array */ public function extract(object $object): array { /** @var Macro $object */ $data = [ 'code' => $object->getCode(), 'variable' => $object->getVariable(), Loading @@ -22,11 +19,6 @@ class MacroHydrator implements HydratorInterface return $data; } /** * @param array $data * @param Macro $object * @return Macro */ public function hydrate(array $data, $object): object { $code = (isset($data['code']) and trim($data['code']) !== null) ? trim($data['code']) : null; Loading @@ -34,6 +26,7 @@ class MacroHydrator implements HydratorInterface $methode = (isset($data['methode']) and trim($data['methode']) !== null) ? trim($data['methode']) : null; $description = (isset($data['description']) and trim($data['description']) !== null) ? trim($data['description']) : null; /** @var Macro $object */ $object->setCode($code); $object->setVariable($variable); $object->setMethode($methode); Loading src/UnicaenRenderer/Form/Template/TemplateForm.php +10 −6 Original line number Diff line number Diff line Loading @@ -28,14 +28,15 @@ class TemplateForm extends Form return $this->getMacroService()->generateJSON(); } public function init() public function init(): void { // code $this->add([ 'type' => Text::class, 'name' => 'code', 'options' => [ 'label' => "Code du contenu * :", 'label' => "Code du contenu <span class='icon icon-obligatoire' title='Champ obligatoire'></span> :", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'code', Loading @@ -53,7 +54,8 @@ class TemplateForm extends Form 'name' => 'type', 'type' => Select::class, 'options' => [ 'label' => 'Type * : ', 'label' => "Type <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'empty_option' => "Sélectionner un type de contenu", 'value_options' => [ Template::TYPE_PDF => "Fichier PDF", Loading Loading @@ -93,7 +95,8 @@ class TemplateForm extends Form 'name' => 'sujet', 'type' => 'textarea', 'options' => [ 'label' => 'Sujet (sujet du courrier électronique, nom du fichier, étiquette, ... ) * : ', 'label' => "Sujet (sujet du courrier électronique, nom du fichier, étiquette, ... ) <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'label_attributes' => [ 'class' => 'control-label', ], Loading @@ -108,7 +111,8 @@ class TemplateForm extends Form 'name' => 'corps', 'type' => 'textarea', 'options' => [ 'label' => 'Corps * : ', 'label' => "Corps <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'label_attributes' => [ 'class' => 'control-label', ], Loading Loading @@ -177,7 +181,7 @@ class TemplateForm extends Form ])); } public function setOldCode($value) public function setOldCode($value): void { $this->get('old-code')->setValue($value); } Loading Loading
src/UnicaenRenderer/Controller/IndexControllerFactory.php +0 −4 Original line number Diff line number Diff line Loading @@ -7,10 +7,6 @@ use Interop\Container\ContainerInterface; class IndexControllerFactory { /** * @param ContainerInterface $container * @return IndexController */ public function __invoke(ContainerInterface $container): IndexController { $controller = new IndexController(); Loading
src/UnicaenRenderer/Form/Macro/MacroForm.php +6 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ class MacroForm extends Form { use ProvidesObjectManager; public function init() public function init(): void { // code $this->add([ Loading @@ -45,7 +45,8 @@ class MacroForm extends Form 'type' => Text::class, 'name' => 'variable', 'options' => [ 'label' => "Variable associée * :", 'label' => "Variable associée <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'variable', Loading @@ -56,7 +57,8 @@ class MacroForm extends Form 'type' => Text::class, 'name' => 'methode', 'options' => [ 'label' => "Méthode associée * :", 'label' => "Méthode associée <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'methode', Loading Loading @@ -114,7 +116,7 @@ class MacroForm extends Form ])); } public function setOldCode($value) public function setOldCode($value): void { $this->get('old-code')->setValue($value); } Loading
src/UnicaenRenderer/Form/Macro/MacroFormFactory.php +0 −2 Original line number Diff line number Diff line Loading @@ -11,8 +11,6 @@ class MacroFormFactory { /** * @param ContainerInterface $container * @return MacroForm * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ Loading
src/UnicaenRenderer/Form/Macro/MacroHydrator.php +2 −9 Original line number Diff line number Diff line Loading @@ -7,12 +7,9 @@ use UnicaenRenderer\Entity\Db\Macro; class MacroHydrator implements HydratorInterface { /** * @param Macro $object * @return array */ public function extract(object $object): array { /** @var Macro $object */ $data = [ 'code' => $object->getCode(), 'variable' => $object->getVariable(), Loading @@ -22,11 +19,6 @@ class MacroHydrator implements HydratorInterface return $data; } /** * @param array $data * @param Macro $object * @return Macro */ public function hydrate(array $data, $object): object { $code = (isset($data['code']) and trim($data['code']) !== null) ? trim($data['code']) : null; Loading @@ -34,6 +26,7 @@ class MacroHydrator implements HydratorInterface $methode = (isset($data['methode']) and trim($data['methode']) !== null) ? trim($data['methode']) : null; $description = (isset($data['description']) and trim($data['description']) !== null) ? trim($data['description']) : null; /** @var Macro $object */ $object->setCode($code); $object->setVariable($variable); $object->setMethode($methode); Loading
src/UnicaenRenderer/Form/Template/TemplateForm.php +10 −6 Original line number Diff line number Diff line Loading @@ -28,14 +28,15 @@ class TemplateForm extends Form return $this->getMacroService()->generateJSON(); } public function init() public function init(): void { // code $this->add([ 'type' => Text::class, 'name' => 'code', 'options' => [ 'label' => "Code du contenu * :", 'label' => "Code du contenu <span class='icon icon-obligatoire' title='Champ obligatoire'></span> :", 'label_options' => [ 'disable_html_escape' => true, ], ], 'attributes' => [ 'id' => 'code', Loading @@ -53,7 +54,8 @@ class TemplateForm extends Form 'name' => 'type', 'type' => Select::class, 'options' => [ 'label' => 'Type * : ', 'label' => "Type <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'empty_option' => "Sélectionner un type de contenu", 'value_options' => [ Template::TYPE_PDF => "Fichier PDF", Loading Loading @@ -93,7 +95,8 @@ class TemplateForm extends Form 'name' => 'sujet', 'type' => 'textarea', 'options' => [ 'label' => 'Sujet (sujet du courrier électronique, nom du fichier, étiquette, ... ) * : ', 'label' => "Sujet (sujet du courrier électronique, nom du fichier, étiquette, ... ) <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'label_attributes' => [ 'class' => 'control-label', ], Loading @@ -108,7 +111,8 @@ class TemplateForm extends Form 'name' => 'corps', 'type' => 'textarea', 'options' => [ 'label' => 'Corps * : ', 'label' => "Corps <span class='icon icon-obligatoire' title='Champ obligatoire'></span> : ", 'label_options' => [ 'disable_html_escape' => true, ], 'label_attributes' => [ 'class' => 'control-label', ], Loading Loading @@ -177,7 +181,7 @@ class TemplateForm extends Form ])); } public function setOldCode($value) public function setOldCode($value): void { $this->get('old-code')->setValue($value); } Loading