This function generate the delete button for a record.
434179
def generate_delete_button record_id
        return unless @args[:index_url]
        url = @args[:index_url].end_with?('/') ? "#{@args[:index_url].gsub(/\?.*/, '')}#{record_id}" : "#{@args[:index_url].gsub(/\?.*/, '')}/#{record_id}"
        return LatoCore::Elements::Button::Cell.new(label: LANGUAGES[:lato_core][:mixed][:delete], url: url, method: 'delete',
        icon: 'trash', style: 'danger', confirmation: {
          message: LANGUAGES[:lato_core][:mixed][:default_delete_message],
          positive_response: LANGUAGES[:lato_core][:mixed][:default_delete_positive_response],
          negative_response: LANGUAGES[:lato_core][:mixed][:default_delete_negative_response]
        })
      end
539257
protected function runSoftDelete()
    {
        $query = $this->newQuery()->where($this->getKeyName(), $this->getKey());

        $this->setAttribute($column = $this->getDeletedAtColumn(), $time = $this->freshTimestamp());

        $query->update(array($column => $this->fromDateTime($time)));
    }
318852
protected function runSoftDelete()
    {
        $query = $this->setKeysForSaveQuery($this->newModelQuery());

        $time = $this->freshTimestamp();

        $columns = [$this->getDeletedAtColumn() => $this->fromDateTime($time)];

        $this->{$this->getDeletedAtColumn()} = $time;

        if ($this->timestamps && ! is_null($this->getUpdatedAtColumn())) {
            $this->{$this->getUpdatedAtColumn()} = $time;

            $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time);
        }

        $query->update($columns);
    }
814599
public void delete() {
		if (tx.isReadOnly() && !isTempTable())
			throw new UnsupportedOperationException();

		if (fhp == null)
			fhp = openHeaderForModification();

		// Log that this logical operation starts
		RecordId deletedRid = currentRecordId();
		tx.recoveryMgr().logLogicalStart();

		// Delete the current record
		rp.delete(fhp.getLastDeletedSlot());
		fhp.setLastDeletedSlot(currentRecordId());

		// Log that this logical operation ends
		tx.recoveryMgr().logRecordFileDeletionEnd(ti.tableName(), deletedRid.block().number(), deletedRid.id());

		// Close the header (release the header lock)
		closeHeader();
	}
414463
public function delete()
    {
        $app = Facade::getFacadeApplication();
        $db = $app->make('database')->connection();

        $cvID = $this->cvID;
        $c = Page::getByID($this->cID, $cvID);
        $cID = $c->getCollectionID();

        $q = "select bID, arHandle from CollectionVersionBlocks where cID = ? and cvID = ?";
        $r = $db->executeQuery($q, array(
            $cID,
            $cvID,
        ));
        while ($row = $r->fetch()) {
            if ($row['bID']) {
                $b = Block::getByID($row['bID'], $c, $row['arHandle']);
                if (is_object($b)) {
                    $b->deleteBlock();
                }
                unset($b);
            }
        }

        $features = CollectionVersionFeatureAssignment::getList($this);
        foreach ($features as $fa) {
            $fa->delete();
        }

        $category = $app->make('Concrete\Core\Attribute\Category\PageCategory');
        $attributes = $category->getAttributeValues($this);
        foreach ($attributes as $attribute) {
            $category->deleteValue($attribute);
        }

        $db->executeQuery('delete from CollectionVersionBlockStyles where cID = ? and cvID = ?', array(
            $cID,
            $cvID,
        ));
        $db->executeQuery('delete from CollectionVersionThemeCustomStyles where cID = ? and cvID = ?', array(
            $cID,
            $cvID,
        ));
        $db->executeQuery('delete from CollectionVersionRelatedEdits where cID = ? and cvID = ?', array(
            $cID,
            $cvID,
        ));
        $db->executeQuery('delete from CollectionVersionAreaStyles where cID = ? and cvID = ?', array(
            $cID,
            $cvID,
        ));

        $db->executeQuery('delete from PageTypeComposerOutputBlocks where cID = ? and cvID = ?', array(
            $cID,
            $cvID,
        ));

        $q = "delete from CollectionVersions where cID = '{$cID}' and cvID='{$cvID}'";
        $db->executeQuery($q);
        $this->refreshCache();
    }
62187
function(record, oData){

		if(this.options.insertWithDialog) {
			this.datatable.updateRow(record, oData);
			return;
		}
		
		var recordNode = Dom.get(this.datatable.getLastSelectedRecord()),
		childNodes = recordNode.childNodes,
		childNodeIndex = childNodes.length - 1,
		innerDivNode = childNodes[childNodeIndex].childNodes[0];
		
		// Update Row with new record
		this.datatable.updateRow(record, oData);
		// Update the ADD / CANCEL buttons to "delete" text
		innerDivNode.innerHTML = inputEx.messages.deleteText;
		// Unselect Row and enable "Insert" button again
		this.datatable.unselectRow(recordNode);
		this.insertButton.disabled = false ;
	}
326673
def _delete_record(self, identifier=None, rtype=None, name=None, content=None):
        
        ids = []

        if identifier:
            ids.append(identifier)
        elif not identifier and rtype and name:
            records = self._list_records(rtype, name, content)
            if records:
                ids = [record["id"] for record in records]

        if ids:
            LOGGER.debug("delete_records: %s", ids)
            with localzone.manage(self.filename, self.origin, autosave=True) as zone:
                for hashid in ids:
                    zone.remove_record(hashid)  # pylint: disable=no-member
                    LOGGER.debug("delete_record: %s", hashid)

        return True
926641
def create_delete_model(record):
    """"""
    data = cloudwatch.get_historical_base_info(record)

    vpc_id = cloudwatch.filter_request_parameters('vpcId', record)

    arn = get_arn(vpc_id, cloudwatch.get_region(record), record['account'])

    LOG.debug(F'[-] Deleting Dynamodb Records. Hash Key: {arn}')

    # tombstone these records so that the deletion event time can be accurately tracked.
    data.update({
        'configuration': {}
    })

    items = list(CurrentVPCModel.query(arn, limit=1))

    if items:
        model_dict = items[0].__dict__['attribute_values'].copy()
        model_dict.update(data)
        model = CurrentVPCModel(**model_dict)
        model.save()
        return model

    return None
1351663
public function getDeleteButton($row, $href, $label, $title, $icon, $attributes)
  {
    if (!$this->isCategoryDeletable($row['id']))
    {
      return $this->generateImage('delete_.gif', $GLOBALS['TL_LANG']['tl_dms_categories']['delete_'][0], 'title="' . sprintf($GLOBALS['TL_LANG']['tl_dms_categories']['delete_'][1], $row['id']) . '"') . " ";
    }
    return '<a href="'.$this->addToUrl($href.'&amp;id='.$row['id']).'" title="'.specialchars($title).'"'.$attributes.'>'.$this->generateImage($icon, $label).'</a> ';
  }
1359563
def _delete(self):
        """"""
        try:
            for record in self._records:
                try:
                    self._records[record]._delete()
                except AttributeError:
                    pass
        except AttributeError:
            pass
516073
final public function delete() {
        global $DB;

        if ($this->raw_get('id') <= 0) {
            throw new coding_exception('id is required to delete');
        }

        // Hook before delete.
        $this->before_delete();

        $result = $DB->delete_records(static::TABLE, array('id' => $this->raw_get('id')));

        // Hook after delete.
        $this->after_delete($result);

        // Reset the ID to avoid any confusion, this also invalidates the model's data.
        if ($result) {
            $this->raw_set('id', 0);
        }

        return $result;
    }
679051
def delete(self):
        ''' 
        '''
        SQL = 'DELETE FROM %s' % self._table
        if self._selectors:
            SQL = ' '.join([SQL, 'WHERE', self._selectors]).strip()
        
        return SQL
372122
function () {
			var that = this;

			var oDialog = new Dialog({
				title: "{i18n>confirmDeletionTitle}",
				type: "Message",
				content: new Text({text: "{i18n>questionFileDeletion}"}),
				beginButton: new Button({
					text: "{i18n>confirm}",
					type: ButtonType.Reject,
					press: function () {
						oDialog.close();
						that._selectTransportAndDeleteFile();
					}
				}),
				endButton: new Button({
					text: "{i18n>cancel}",
					press: function () {
						oDialog.close();
					}
				}),
				afterClose: function () {
					oDialog.destroy();
				}
			});

			this.getView().addDependent(oDialog);

			oDialog.open();
		}
639329
function(ev,args) {
      var target = Event.getTarget(ev);
      var column = this.datatable.getColumn(target);      
      var rowIndex = this.datatable.getTrIndex(target);
      var record = this.datatable.getRecord(target);

      if (column.key == 'delete') {
			this.onRemoveItem(record,target);	
      }
      else {				
      	this.onCellClick(ev,rowIndex);
      }
   }
872811
def create_delete_model(record):
    """"""
    arn = f"arn:aws:s3:::{cloudwatch.filter_request_parameters('bucketName', record)}"
    LOG.debug(f'[-] Deleting Dynamodb Records. Hash Key: {arn}')

    data = {
        'arn': arn,
        'principalId': cloudwatch.get_principal(record),
        'userIdentity': cloudwatch.get_user_identity(record),
        'accountId': record['account'],
        'eventTime': record['detail']['eventTime'],
        'BucketName': cloudwatch.filter_request_parameters('bucketName', record),
        'Region': cloudwatch.get_region(record),
        'Tags': {},
        'configuration': {},
        'eventSource': record['detail']['eventSource'],
        'version': VERSION
    }

    return CurrentS3Model(**data)
1005125
def delete(cls, zone_id, record):
        """"""
        cls.echo('Creating new zone record')
        new_version_id = Zone.new(zone_id)

        cls.echo('Deleting zone record')
        cls.call('domain.zone.record.delete', zone_id, new_version_id, record)

        cls.echo('Activation of new zone version')
        Zone.set(zone_id, new_version_id)

        return new_version_id
310319
private void deleteHoleRecords() {
    listener.onMessage("\nDelete temporary records...");

    final ORecordId rid = new ORecordId();
    final ODocument doc = new ODocument(rid);
    for (String recId : recordToDelete) {
      doc.reset();
      rid.fromString(recId);
      doc.delete();
    }
    listener.onMessage("OK (" + recordToDelete.size() + " records)");
  }