Returns entities based upon metadata. Also accepts all
options available to elgg_get_entities(). Supports
the singular option shortcut.
public getEntities ( array $options = [] ) : ElggEntity[] | mixed | ||
$options | array | Array in format: metadata_names => null|ARR metadata names metadata_values => null|ARR metadata values metadata_name_value_pairs => null|ARR ( name => 'name', value => 'value', 'operand' => '=', 'case_sensitive' => true ) Currently if multiple values are sent via an array (value => array('value1', 'value2') the pair's operand will be forced to "IN". If passing "IN" as the operand and a string as the value, the value must be a properly quoted and escaped string. metadata_name_value_pairs_operator => null|STR The operator to use for combining (name = value) OPERATOR (name = value); default AND metadata_case_sensitive => BOOL Overall Case sensitive order_by_metadata => null|ARR array( 'name' => 'metadata_text1', 'direction' => ASC|DESC, 'as' => text|integer ) Also supports array('name' => 'metadata_text1') metadata_owner_guids => null|ARR guids for metadata owners |
return | ElggEntity[] | mixed | If count, int. If not count, array. false on errors. |