public function delete(IRow &$row)
    {
        $res = $this->getTable()->wherePrimary($row->getPrimary())->delete();
        $oldValues = [];
        if ($row instanceof ActiveRow) {
            $oldValues = $row->toArray();
        }

        if (!$res) {
            return false;
        }

        if ($this->auditLogRepository) {
            $from = $this->filterValues($this->excludeColumns($oldValues));

            $data = [
                'version' => '1',
                'from' => $from,
                'to' => [],
            ];
            $this->pushAuditLog(AuditLogRepository::OPERATION_DELETE, $row->getSignature(), $data);
        }

        return true;
    }
public function delete(IRow &$row)
    {
        $res = $this->getTable()->wherePrimary($row->getPrimary())->delete();
        $oldValues = [];
        if ($row instanceof ActiveRow) {
            $oldValues = $row->toArray();
        }

        if (!$res) {
            return false;
        }

        if ($this->auditLogRepository) {
            $from = $this->filterValues($this->excludeColumns($oldValues));

            $data = [
                'version' => '1',
                'from' => $from,
                'to' => [],
            ];
            $this->pushAuditLog(AuditLogRepository::OPERATION_DELETE, $row->getSignature(), $data);
        }

        return true;
    }
public function delete ( IRow & $ row ) { $ res = $ this -> getTable ( ) -> wherePrimary ( $ row -> getPrimary ( ) ) -> delete ( ) ; $ oldValues = [ ] ; if ( $ row instanceof ActiveRow ) { $ oldValues = $ row -> toArray ( ) ; } if ( ! $ res ) { return false ; } if ( $ this -> auditLogRepository ) { $ from = $ this -> filterValues ( $ this -> excludeColumns ( $ oldValues ) ) ; $ data = [ 'version' => '1' , 'from' => $ from , 'to' => [ ] , ] ; $ this -> pushAuditLog ( AuditLogRepository :: OPERATION_DELETE , $ row -> getSignature ( ) , $ data ) ; } return true ; }
Delete deletes provided record from repository and mutates the provided instance. Operation is logged to audit log.

@param IRow $row
@return bool
Delete deletes provided record from repository and mutates the provided instance . Operation is logged to audit log .