Elgg\Database\Annotations::disableAll PHP Method

disableAll() public method

Disables annotations based on $options.
public disableAll ( array $options ) : boolean | null
$options array An options array. {@link elgg_get_annotations()}
return boolean | null true on success, false on failure, null if no annotations disabled.
    function disableAll(array $options)
    {
        if (!_elgg_is_valid_options_for_batch_operation($options, 'annotation')) {
            return false;
        }
        // if we can see hidden (disabled) we need to use the offset
        // otherwise we risk an infinite loop if there are more than 50
        $inc_offset = access_get_show_hidden_status();
        $options['metastring_type'] = 'annotations';
        return _elgg_batch_metastring_based_objects($options, 'elgg_batch_disable_callback', $inc_offset);
    }