xpdo icon indicating copy to clipboard operation
xpdo copied to clipboard

Make it possible to find key/value pairs

Open JoshuaLuckers opened this issue 6 years ago • 5 comments

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.

Example from CakePHP:

It is often useful to generate an associative array of data from your application’s data. For example, this is very useful when creating

$query = $articles->find('list');
$data = $query->toArray();

// Data now looks like
$data = [
    1 => 'First post',
    2 => 'Second article I wrote',
];

JoshuaLuckers avatar Jun 03 '18 11:06 JoshuaLuckers