Deletes an item object.

@param integer $id Unique ID of the item
495315
public function deleteItem( $id )
	{
		$actual = $this->_getManager()->getItem( $id );
		$siteId = $this->_getContext()->getLocale()->getSiteId();

		if( $actual->getSiteId() != $siteId ) {
			throw new MShop_Exception( sprintf( 'Item can not be deleted. Site ID of item differs from present site ID.' ) );
		}

		parent::deleteItem( $id );
	}
1259047
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Yii::$app->getAuthManager()->remove($model->item);
        Helper::invalidate();

        return $this->redirect(['index']);
    }
584588
public function destroy($id)
    {
        $item = LBSM_item::findOrFail($id);
        $item->delete();
        return redirect()->back();
    }
390698
public function delete($id)
    {
        $id = explode(',', $id);

        if ($this->request->isPost() || $this->request->isDelete()) {
            $single = false;
            if (count($id) === 1) {
                $single = true;
            }

            try {
                $this->data['entries'] = array();

                foreach ($id as $value) {
                    $model = $this->collection->findOne($value);

                    if (is_null($model)) {
                        if ($single) {
                            $this->app->notFound();
                        }

                        continue;
                    }

                    $model->remove();

                    $this->data['entries'][] = $model;
                }

                h('notification.info', $this->clazz.' deleted.');

                h('controller.delete.success', array(
                    'models' => $this->data['entries'],
                ));

            } catch (Stop $e) {
                throw $e;
            } catch (Exception $e) {
                h('notification.error', $e);

                if (empty($model)) {
                    $model = null;
                }

                h('controller.delete.error', array(
                    'error' => $e,
                    'model' => $model,
                ));
            }

        }
    }
799211
public function actionDelete(string $id)
    {
        $model = $this->findModel($id);
        Yii::$app->authManager->remove($model->item);
        Yii::$app->session->setFlash('success', Yii::t('yii2mod.rbac', 'Rule has been deleted.'));

        return $this->redirect(['index']);
    }
147401
public function delete(string $id)
    {
        $this->request->allowMethod('delete');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $success = false;
        if (null !== $entity) {
            Assert::isInstanceOf($entity, EntityInterface::class);
            $success = $this->SavedSearches->delete($entity);
        }

        $this->set('success', $success);
        $success ?
            $this->set('data', []) :
            $this->set('error', 'The saved search could not be deleted. Please, try again.');
        $this->set('_serialize', ['success', 'data', 'error']);
    }
661845
public function delete(int $id): void
    {
        $this->getClient()->call(null, $id, self::ENDPOINT, null, false, 'DELETE');
    }
78150
public static function removeById(int $id) {
		if ($user = R::findOne('user', ' id = ? ', [$id])) {
			R::trash($user);
		}
	}
642714
public function delete($id)
    {
        $this->beforeDelete($id);
        $this->entity->delete($id);
        $this->afterDelete($id);
    }
742363
public function deleteRow(int $id) : void
    {
        $this->crudEnabled();

        // Generate the values
        $table_name = static::$table_name;
        $id_column = static::$id_column;

        $sql = "DELETE FROM {$table_name} WHERE {$id_column} = :key";
        $this->dbc->query($sql, ['params' => [':key' => $id]]);
    }
921106
public function destroy($id)
    {
        // Find the item
        $item = $this->findOrFail($id);

        // Delete row (this should trigger file attachment deletes as well)
        $item->delete();

        // As long as not an ajax request, go back to the parent directory of the referrer
        if (Request::ajax()) {
            return Response::json();
        } else {
            return Redirect::to(DecoyURL::relative('index'))
            ->with('success', $this->successMessage($item, 'deleted'));
        }
    }
1180952
public function delete($id = null)
    {
        // If an ID is passed to the method, we will set the where clause to check
        // the ID to allow developers to simply and quickly remove a single item
        // without manually specifying the where clauses.
        if (! is_null($id)) {
            $this->where('id', '=', $id);
        }

        return $this->processor->processDeleteRequest($this, $this->runRequest());
    }
8573
public function handleDelete(int $id): void
	{
		if ($this->isAjax()) {
			$user = $this->orm->users->getById($id);
			$this->orm->users->removeAndFlush($user);
			$this['userList']->reload();
		} else {
			$this->terminate();
		}
	}
103195
public function remove($id)
    {
        $this->client->delete(Inflector::pluralize($this->getResourceName()).'/'.$id);
    }
872045
public void deleteById(String id) {
    if (idToVersion.containsKey(id)) {
      String version = idToVersion.remove(id);
      expirationVersion.remove(version);
      versionToItem.remove(version);
      if (collectionCachePath != null
          && !collectionCachePath.resolve(version).toFile().delete()) {
        log.debug("couldn't delete " + version);
      }
    }
  }
1169712
public function delete(int $id)
    {
        try {
            $sh = @shmop_open($this->getSharedItemKey($id), 'w', 0, 0);
        } catch (\Throwable $e) {
            return false;
        }

        if (!$sh) {
            return false;
        }

        $deleted = shmop_delete($sh);
        shmop_close($sh);

        return $deleted;
    }
1113571
public static function destroy($id) {
        $model = get_called_class();
        /* @var $model Record */
        $model = new $model;
        $pk = $model->getPkField();
        $model->$pk = $id;
        $model->delete();
    }