yii\mongodb\ActiveRecord::deleteAll PHP Метод

deleteAll() публичный статический Метод

WARNING: If you do not specify any condition, this method will delete documents rows in the collection. For example, to delete all customers whose status is 3: php Customer::deleteAll(['status' => 3]);
public static deleteAll ( array $condition = [], array $options = [] ) : integer
$condition array description of the objects to delete. Please refer to [[Query::where()]] on how to specify this parameter.
$options array list of options in format: optionName => optionValue.
Результат integer the number of documents deleted.
    public static function deleteAll($condition = [], $options = [])
    {
        return static::getCollection()->remove($condition, $options);
    }