BaseActiveRecordVersioned::deleteAllByAttributes PHP Method

deleteAllByAttributes() public method

public deleteAllByAttributes ( $attributes, $condition = '', $params = [] )
    public function deleteAllByAttributes($attributes, $condition = '', $params = array())
    {
        $transaction = $this->dbConnection->beginInternalTransaction();
        try {
            $this->versionToTable($this->commandBuilder->createColumnCriteria($this->tableName(), $attributes, $condition, $params));
            $result = parent::deleteAllByAttributes($attributes, $condition, $params);
            $transaction->commit();
            return $result;
        } catch (Exception $e) {
            $transaction->rollback();
            throw $e;
        }
    }