I'm working on a project where I'm using Physical Fields to store dimensions of products. I'm working down my spec document's field list and realize in addition for fields for Length (m) and Volume (m^3), I also need a field for Area (m^2).
I've checked the dev version and Area seems completely absent from Physical fields.
I actually need this desperately enough to be willing to work on this myself. Would anyone object to me working on an Area patch for 8.x-1.x-dev? I'd basically attempt to replicate what was done for volume: (sq cm, ft, in, m, mm, hectare?, acre?).
Or does this instead belong in an add on module of some kind?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2840867-area-field-type-5.patch | 5.48 KB | trevorbradley |
Comments
Comment #2
bojanz commentedSure, go ahead and add Area. I have no objections to having it inside this module.
Comment #3
trevorbradley commentedThanks @bojanz! I'll get to work on it, and hope to have something up by tomorrow.
Comment #4
bojanz commentedAs for which units to include, I just went with the most popular ones, and figured people would patch-in any missing ones that are important. It's more sensible than shipping with 30 possible ones like some modules do.
Comment #5
trevorbradley commentedOK, here's a first area unit patch, with test. Looks good to me at first glance. Tested locally with phpunit, so in theory this should pass. :)
Comment #6
bojanz commentedComment #8
bojanz commentedMade a few tweaks to the MeasurementTypes class (so that the types are alphabetic), expanded the README, and committed. Thanks!
Comment #9
trevorbradley commentedRedeployed 8.x-1.x-dev. Looks great @bojanz! Thanks!