- Issue created by @effortDee
- 🇬🇧United Kingdom joachim
The PHP code goes into a plugin class.
See the examples in the module code and in the tests in particular.
- 🇬🇧United Kingdom joachim
The clever thing would be to use the same one plugin class for ALL the averages. But you'd need a way for it to know which field it's taking its data from.
The quick way would be to call each computed field a name that derives from the data source field, e.g. field_distance / field_distance_average. Then the plugin class removes the suffix '_average' from the name of the field it's computing, and uses that to run the average query.