WeAreAthlon / Silla.IO

PHP Application Development Framework.
https://silla.io
GNU General Public License v3.0
25 stars 3 forks source link

Add export hooks for each data field within Base\Resource #27

Open sandio opened 9 years ago

pnikolov commented 8 years ago

Any ideas how to implement this?

pnikolov commented 8 years ago

What about magic __call() for example

function export_created_on() {}
function export_updated_on() {}
function export_name() {}
...

@kalins ?

pnikolov commented 7 years ago

I've found a better solution. What about adding HTML support to the generated export and run the list view for each entity attribute? This will reuse all the code used for the listing in the data tables. This approach will be useful for the PDF export, but for the CSV, maybe we should keep the raw DB data.