Deletes the existing/current model

@return  bool
@since   2.0.0
511932
public function destroy()
	{
		// If it has an associated asset entry, try deleting that first
		if ($this->hasAttribute('asset_id'))
		{
			if (!Asset::destroy($this))
			{
				return false;
			}
		}

		\Event::trigger('system.onContentDestroy', array($this->getTableName(), $this));
		return $this->query->remove(
			$this->getTableName(),
			$this->getPrimaryKey(),
			$this->getPkValue()
		);
	}
137346
public function delete()
    {
        $data = $this->getData();
        if (isset($this->currentId))
            unset($data[$this->currentKey]);
        elseif($this->documentEntries)
            $data = array_diff_key($data,$this->documentEntries);
        else
            $data = [];
        $this->documentEntries = array_values($data);
        return $this->databaseDocument->put($this->documentEntries) ? true : false;
    }
684227
public function delete(){
        if($this->beforeDelete()){
            $pkConditions = $this->buildPKConditions();
            if(false !== $rst = ($this->isNew() || $this->_db->builder()->delete($this->getTable(), $pkConditions[0], $pkConditions[1]))){
                $this->_data = array();
                $this->_dirty = array();
                $this->afterDelete();
                
                return $rst;
            }
        }
        
        return false;
    }
83309
public function delete()
    {
        $this->getLogger()->info('Deleting Player Version version ID ' . $this->versionId);
        $this->doDelete('/playersoftware/' . $this->versionId);

        return true;
    }
1310079
public function delete()
    {
        if ($this->exists && $deleted = $this->service->delete($this->getId())) {
            $this->setAttributes($deleted->toArray());
            return !$this->exists = false;
        }
        return false;
    }
764493
public function delete()
    {
        if (is_null($this->primaryKey) ||  is_null($this->getKey())) {
            throw new RuntimeException("No primary key defined on model.");
        }

        if ($this->exists) {
            if ($this->fireModelEvent('deleting') === false) {
                return false;
            }

            if (! $this->performDeleteOnModel()) {
                return false;
            }

            $this->exists = false;

            // Once the model has been deleted, we will fire off the deleted event so that
            // the developers may hook into post-delete operations. We will then return
            // a boolean true which indicated the success of the delete operation on the API.
            $this->fireModelEvent('deleted', true);

            return true;
        }
    }
657688
public function hasSoftDeleting()
    {
        if (!$this->hasDeleting()) {
            return false;
        }

        $managedModelClass = $this->getManagedModel();

        return in_array(
            SoftDeletes::class, class_uses_recursive(get_class(new $managedModelClass()))
        ) && $this->hasDeleting();
    }
294525
public function delete()
    {
        foreach ($this->value as $index => $item) {
            $item->delete();
            unset($this->value[$index]);
        }

        return true;
    }
625494
public function delete()
    {
        // Deleting all children
        foreach ($this->getChildren() as $child) {
            $child->delete();
        }

        // Removing the directory itself
        rmdir($this->path);

        return true;
    }
1161051
public function delete()
    {
        if (!$this->allow_delete) {
            throw $this->exception('Deleting is not allowed');
        }

        $m = $this->model;
        if (!$m->loaded()) {
            throw $this->exception('Cowardly refusing to delete all records');
        }

        $m->delete();

        return true;
    }
626273
public function delete()
    {
        $path = $this->model->getPath('destroy');

        return $this->query->from($path)
                ->delete();
    }
837813
public function delete()
    {
        $data = $this->getData();
        if (isset($this->currentId))
        {
            unset($data[$this->currentKey]);
        }
        else
        {
            $this->pending();
            $old  = $data;
            $data = array_diff_key($old, $this->data);
        }
        $this->data = array_values($data);

        return Helpers\Data::table($this->name)->put($this->data) ? true : false;
    }
615138
function delete()
    {

        if (!$this->exists()) {
            return false;
        }

        $this->newQuery()->id($this->getID())->delete();

        $this->exists = false;

        return $this;
    }
958887
public function revert()
    {
        $model = $this->getModel();
        unset( $model->{$model->getCreatedAtColumn()} );
        unset( $model->{$model->getUpdatedAtColumn()} );
        if (method_exists($model, 'getDeletedAtColumn')) {
            unset( $model->{$model->getDeletedAtColumn()} );
        }
        $model->save();
        return $model;
    }
754319
public function delete()
    {
        if (isset($this->onDelete)) {
            return call_user_func($this->onDelete, $this);
        }

        return $this->query->delete();
    }
543009
public function delete() {
        global $DB;

        \core_analytics\manager::check_can_manage_models();

        $this->clear();

        // Method self::clear is already clearing the current model version.
        $predictor = $this->get_predictions_processor(false);
        if ($predictor->is_ready() !== true) {
            $predictorname = \core_analytics\manager::get_predictions_processor_name($predictor);
            debugging('Prediction processor ' . $predictorname . ' is not ready to be used. Model ' .
                $this->model->id . ' could not be deleted.');
        } else {
            $predictor->delete_output_dir($this->get_output_dir(array(), true));
        }

        $DB->delete_records('analytics_models', array('id' => $this->model->id));
        $DB->delete_records('analytics_models_log', array('modelid' => $this->model->id));
    }
520865
public function actionDelete()
    {
        if ($this->findModel()->delete()) {
            \Yii::$app->getSession()->setFlash('success', $this->getFlashMsg('success'));;
        } else {
            \Yii::$app->getSession()->setFlash('error', $this->getFlashMsg('error'));
        }
        return $this->redirect(['index']);
    }