yii\db\Transaction::getIsActive PHP Method

getIsActive() public method

Returns a value indicating whether this transaction is active.
public getIsActive ( ) : boolean
return boolean whether this transaction is active. Only an active transaction can [[commit()]] or [[rollBack()]].
    public function getIsActive()
    {
        return $this->_level > 0 && $this->db && $this->db->isActive;
    }