stable

Clone or download

Read-only

refactor: convert assoc array to presenter object

The form elements used to create a new template will be the same than the one to update a template. In order to have a common base and not repeat ourselves those form elements are extracted in a dedicated mustache file. A template presenter dedicated to the creation is injected instead of directly its styles. Took the opportunity to convert the associative array used as a presenter to an object. No functional changes in template creation. Part of story #38630: Export to file Change-Id: I2e5e2b4cd6b59b0e1e81eba4ff6018a07c692b11

Modified Files

Name
M plugins/pdftemplate/include/PdfTemplate/Admin/DisplayPdfTemplateCreationFormController.php +6 −7 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/DisplayPdfTemplateCreationFormPresenter.php +43 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/IndexPdfTemplatePresenter.php +1 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/PdfTemplatePresenter.php +13 −1 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/Admin/create.mustache +1 −37 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Admin/template-form-elements.mustache +40 −0 Go to diff View file