How can I get all the unique metadata in a list of entities?
Example:
I have entities with a subtype "posts" with a metadata "area" that the user inputs in a form.
I want to get an array of all the unique metadata "area" from the entities with subtype "post"
I know the following is wrong, just an idea of what I'm trying to do.
$entities = elgg_get_entities($options);
$array_areas = $entities->area
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
You must log in to post replies.There are metadata function, no need to get it through the entities.
'metadata_names' => 'area',
instead of
'metadataname' => 'area',