SoftDelete\Model\Table\SoftDeleteTrait::deleteAll PHP Method

deleteAll() public method

Soft deletes all records matching $conditions.
public deleteAll ( $conditions ) : integer
return integer number of affected rows.
    public function deleteAll($conditions)
    {
        $query = $this->query()->update()->set([$this->getSoftDeleteField() => date('Y-m-d H:i:s')])->where($conditions);
        $statement = $query->execute();
        $statement->closeCursor();
        return $statement->rowCount();
    }