Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use the file in a controller? #6

Closed
philippfrenzel opened this issue Mar 14, 2015 · 4 comments
Closed

How can I use the file in a controller? #6

philippfrenzel opened this issue Mar 14, 2015 · 4 comments

Comments

@philippfrenzel
Copy link

e.g. I wanna open a word file (attachement) and then wanna replace stuff inside to deploy to user?

Thanks Philipp

@CTOlet
Copy link
Owner

CTOlet commented Mar 15, 2015

I have not understood what do u want to do. Could u explain/give me an example?

@philippfrenzel
Copy link
Author

I wanna do this:

http://phpword.readthedocs.org/en/latest/templates-processing.html

Which means:

´´´
$templateProcessor = new TemplateProcessor('Template.docx');
$templateProcessor->setValue('Name', 'Somebody someone');
$templateProcessor->setValue('Street', 'Coming-Undone-Street 32');
´´´

Where Template.docx is the file I uploaded to a model, using your module;)

@CTOlet
Copy link
Owner

CTOlet commented Mar 16, 2015

Now u can use

model->files[0]->path // for single file

or

foreach ($model->files as $file) {
    echo $file->path;
}

Is that all you need to?

@philippfrenzel
Copy link
Author

Jep! exactly! ;) THanks a Lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants