Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Programmatic creation of flex objects

Started by Thomas Vantuycom 6 years ago · 0 replies · 558 views
6 years ago

I'm looking to save some data in the user/data folder as part of a plugin's functionality and I'd like to use the flex object interface for its promise of advanced CRUD operations. However, I'm not sure how to create and store a flex object programmatically.

On a simple checkout form I define a custom action, which I can hook into on onFormProcessed, that part is fine. Now I'd like to create an order object and save it in the data folder. How do I go about this? Let's say for now the order object contains the order date, a product id and a price.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 47 1 week ago
Plugins · by Xavier, 4 weeks ago
2 56 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1182 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 74 2 months ago