Hay Guys i want generate a CSV file i create function (generate_contactForm_data()) ho generate my file know i want to associate the function white the menu link if some one can help me plz
thenk you

Comments

Sam Moore’s picture

You could use Views with Views Data Export to do this for you. Or at least look at how Views Data Export does it.
https://www.drupal.org/project/views_data_export

Oualid-EZR’s picture

thank you for your help
but I create my own function ho can generate my excel file data :D

Sam Moore’s picture

So your questions is, how to make the function fire when the user selects a menu link?
Read up on D8's menu routing setup here:
https://www.drupal.org/developing/api/8/menu

This has replaced what used to be callbacks in D7.

mgifford’s picture