php - How to generate files with a Drupal module?
Get the solution ↓↓↓I have a site that works with Drupal 8.
Here is my problem
My question may be complicated because I don't know where to start and if I have done the correct method so far.
I want to create in Drupal 8, a form, where users can enter their information.
I want that when the user clicks on the "Generate" button to submit the form, the information entered will replace the information in all the files and the files will be uploaded to an archive on the user's device.
I entered keywords in the form and files to give an example. When the user fills in the title field of the form (this is the first field), it must replace all the words "TokenTitle" in the files. Ditto for the other tokens.
Is such a module possible ? If so, how do you create it ?
Here are the files I want to modify :
https://github.com/S1BIOSE/test
Here is my custom module :
https://github.com/S1BIOSE/generator_website
Here is the form I want to use to replace tokens in files :
https://www.s1biose.com/fr/generator-website
The information entered on this form does not need to be saved. It must generate the files on the fly and keep nothing.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: installation failed, reverting ./composer.json and ./composer.lock to their original content
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.