Elgg\Database\MetadataTable::getAll PHP Method

getAll() public method

Returns metadata. Accepts all elgg_get_entities() options for entity restraints.
See also: elgg_get_entities
public getAll ( array $options = [] ) : ElggMetadata[] | mixed
$options array Array in format: metadata_names => null|ARR metadata names metadata_values => null|ARR metadata values metadata_ids => null|ARR metadata ids metadata_case_sensitive => BOOL Overall Case sensitive metadata_owner_guids => null|ARR guids for metadata owners metadata_created_time_lower => INT Lower limit for created time. metadata_created_time_upper => INT Upper limit for created time. metadata_calculation => STR Perform the MySQL function on the metadata values returned. The "metadata_calculation" option causes this function to return the result of performing a mathematical calculation on all metadata that match the query instead of returning \ElggMetadata objects.
return ElggMetadata[] | mixed
    function getAll(array $options = array())
    {
        // @todo remove support for count shortcut - see #4393
        // support shortcut of 'count' => true for 'metadata_calculation' => 'count'
        if (isset($options['count']) && $options['count']) {
            $options['metadata_calculation'] = 'count';
            unset($options['count']);
        }
        $options['metastring_type'] = 'metadata';
        return _elgg_get_metastring_based_objects($options);
    }