Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » "Formulas" Module

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 788 Views
  • Hamish
    Community Member
    712 Posts

    "Formulas" Module Link to this post

    Hi all,

    I'm figuring out how a 'formulas' extension could best be built.

    At the moment, I'm thinking of something like:

    A 'Formula' abstract class that extends 'DataObjectSet'. This class can have any number of methods that represent particular calculations which might be done recusively on each object in the set, or summarizing particular properties in the set.

    It would have some standard methods such as:

    applyToAll('qty', 'sum')

    which would return a value based on applying the method 'sum' to the an array of all property 'qty' of child objects


    applyToEach('diameter', 'area')

    whilch return an array of values based on applying the method 'area' to each property 'diameter'.

    Just looking for thoughts and ideas about how to improve it etc. if I build it I'd like it to be as versatile as possible, and if it already exists that would save me lots of time

  • Hamish
    Community Member
    712 Posts

    Re: "Formulas" Module Link to this post

    Some other notes - I'm also looking at things like defining a time scale/relative measure so you can start doing complex things like differentiating/integrating over a value, and perhaps putting it out there as a better method for creating marker filter functions, etc.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.