Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Make it possible to find key/value pairs #141
I use CakePHP at work and I love how easy it is to find key/value pairs.
This would also be very useful in for example MODX. It would make it easier to show the "display name" of a system setting (like the name of the default template) instead of the value for the primary key.
In MODX for example there are various places where a "displayField" would be useful.
For example, templates:
In most cases we always want to show it's name. In dropdown, system settings etc.
This way the "model" of the object defines how it should be displayed making it easier for others.
And yes, its a convenience method but I'm sure it would be a great addition for a lot of snippet/chunks developers.
In CakePHP they have behaviors. For entity/object translations you can use the TranslateBehavior. I have to dig a bit deeper into xPDO to check how this can be accomplished in xPDO.
Of course I don’t want xPDO to become CakePHP, but I do find it handy how they solve this.