CakeDC / Enum

Enumeration list for CakePHP
MIT License
27 stars 17 forks source link

Nested list #33

Closed ADmad closed 7 years ago

ADmad commented 7 years ago

This would be useful when the list is converted to JSON for consumption by JS code on client side. It ensures you get the exact order of values since if a flat key/value array is converted to JSON object you can't be sure of the order of the object properties.

I chose this form of nesting since it's also supported by FormHelper, so one can use same format for Cake's HTML views and json APIs.

steinkel commented 7 years ago

Thanks, yes that would be useful