yii2tech\ar\softdelete\SoftDeleteBehavior::softDelete PHP Method

softDelete() public method

Marks the owner as deleted.
public softDelete ( ) : integer | false
return integer | false the number of rows marked as deleted, or false if the soft deletion is unsuccessful for some reason. Note that it is possible the number of rows deleted is 0, even though the soft deletion execution is successful.
    public function softDelete()
    {
        if ($this->isDeleteAllowed()) {
            return $this->owner->delete();
        }
        if ($this->invokeDeleteEvents && !$this->owner->beforeDelete()) {
            return false;
        }
        $result = $this->softDeleteInternal();
        if ($this->invokeDeleteEvents) {
            $this->owner->afterDelete();
        }
        return $result;
    }