Handler with form to delete an item.

@return void
962454
public function getPostDeleteItem($id)
    {
        $title      = "Ta bort ett inlägg";
        $sess = $this->getSess();

        if ($sess) {
            $form       = new DeleteCommForm($this->di, $id);
            $form->check();

            $data = [
                "form" => $form->getHTML(),
            ];
        } else {
            $data = [
                "form" => "Enbart för inloggade. Sorry!",
            ];
        }

        $crud = "comm/crud/delete";
        $this->toRender($title, $crud, $data);
    }
1174380
public function actionDelete()
    {
        if (isset($_GET['name'])) {
            $name = $_GET['name'];

            /* @var $am CAuthManager|AuthBehavior */
            $am = Yii::app()->getAuthManager();

            $item = $am->getAuthItem($name);
            if ($item instanceof CAuthItem) {
                $am->removeAuthItem($name);
                if ($am instanceof CPhpAuthManager) {
                    $am->save();
                }

                if (!isset($_POST['ajax'])) {
                    $this->redirect(array('index'));
                }
            } else {
                throw new CHttpException(404, Yii::t('AuthModule.main', 'Item does not exist.'));
            }
        } else {
            throw new CHttpException(400, Yii::t('AuthModule.main', 'Invalid request.'));
        }
    }
83285
public function delete()
	{
		parent::delete();

		$item = $this->getView()->item;
		$item->deleteListItems( $item->getListItems( 'text', null, null, false ), true );
	}
1262180
private function action_delete()
    {
        $mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST, true)); //UTF7-IMAP
        $user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST));

        $user = explode(',', $user);

        foreach ($user as $u) {
            $u = trim($u);
            if ($this->rc->storage->delete_acl($mbox, $u)) {
                $this->rc->output->command('acl_remove_row', rcube_utils::html_identifier($u));
            }
            else {
                $error = true;
            }
        }

        if (!$error) {
            $this->rc->output->show_message('acl.deletesuccess', 'confirmation');
        }
        else {
            $this->rc->output->show_message('acl.deleteerror', 'error');
        }
    }
694061
public function deleteAction()
    {
        if ($this->isConfirmedItem($this->_('Delete %s'))) {
            $model   = $this->getModel();
            $deleted = $model->delete();

            $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');
            $this->_reroute(array('action' => 'index'), true);
        }
    }
884085
private function delete()
    {
        $item = Eresus_CMS::getLegacyKernel()->sections->get(arg('id', 'int'));
        Eresus_CMS::getLegacyKernel()->sections->delete(arg('id', 'int'));
        dbReorderItems('pages', "`owner`='".$item['owner']."'");
        HTTP::redirect(Eresus_Kernel::app()->getPage()->url(array('id'=>'')));
    }
1011757
public function delete()
    {
        if (!$this->isLoaded()) {
            //Nothing to do, do we need an exception here?
            return;
        }

        $this->dispatch('delete', new DocumentEvent($this));

        //Performing deletion
        $this->odm->collection(static::class)->deleteOne(['_id' => $this->primaryKey()]);
        $this->setField('_id', null, false);
        //Done with deletion

        $this->dispatch('deleted', new DocumentEvent($this));
    }
1202421
public function delete()
	{
		$view = $this->getView();
		$context = $this->getContext();

		$manager = \Aimeos\MShop::create( $context, 'catalog/lists' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'catalog.lists.refid', $view->param( 'id' ) ),
			$search->compare( '==', 'catalog.lists.domain', 'product' )
		);
		$search->setConditions( $search->combine( '&&', $expr ) );
		$search->setSlice( 0, 0x7fffffff );

		$start = 0;

		do
		{
			$search->setSlice( $start );

			$result = $manager->searchItems( $search );
			$manager->deleteItems( array_keys( $result ) );

			$count = count( $result );
			$start += $count;
		}
		while( $count >= $search->getSliceSize() );
	}
327954
public function delete()
    {
        $driveLocator = "/drives/{$this->parentReference->driveId}";
        $itemLocator  = "/items/{$this->id}";
        $endpoint     = "$driveLocator$itemLocator";

        $response = $this
            ->graph
            ->createRequest('DELETE', $endpoint)
            ->execute();

        $status = $response->getStatus();

        if ($status != 204) {
            throw new \Exception("Unexpected status code produced by 'DELETE $endpoint': $status");
        }
    }
790148
public function actionDeleteAll()
    {
        if(isset($_POST['items'])) {
            foreach($_POST['items'] as $id) {
                $this->findModel($id)->deleteWithChildren();
            }
        }
    }
706124
function delete() {
			$this->_data = array();

			$all_data = $this->get_all_data();
			unset( $all_data[ $this->_secondary_id ] );
			$options_manager = $this->get_option_manager();
			$options_manager->set_option( $this->_id, $all_data, true );
		}
136019
public function delete()
	{
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		// Get items to remove from the request.
		$cid = $this->input->get('cid', array(), 'array');
		$extension = $this->input->getCmd('extension', null);

		if (!is_array($cid) || count($cid) < 1)
		{
			JError::raiseWarning(500, JText::_($this->text_prefix . '_NO_ITEM_SELECTED'));
		}
		else
		{
			// Get the model.
			/** @var CategoriesModelCategory $model */
			$model = $this->getModel();

			// Make sure the item ids are integers
			$cid = ArrayHelper::toInteger($cid);

			// Remove the items.
			if ($model->delete($cid))
			{
				$this->setMessage(JText::plural($this->text_prefix . '_N_ITEMS_DELETED', count($cid)));
			}
			else
			{
				$this->setMessage($model->getError());
			}
		}

		$this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&extension=' . $extension, false));
	}
739481
public function remove()
    {
        $key = $this->request->param('ID');
        $title = "";

        if (!empty($key)) {
            foreach ($this->items as $item) {
                if ($item->Key == $key) {
                    $title = $item->Title;
                    $this->items->remove($item);
                }
            }

            $this->save();
            
            if ($title) {
                $this->setSessionMessage(
                    "bad",
                    _t(
                        "Checkout.RemovedItem",
                        "Removed '{title}' from your cart",
                        "Message to tell user they removed an item",
                        array("title" => $title)
                    )
                );
            }
        }

        return $this->redirectBack();
    }
1106707
public function delete()
    {
        $sql = 'delete from `' . $this->table . '`';

        if (!is_null($this->where)) {
            $sql .= ' where ' . $this->where;

            $this->where = null;
        }

        $stmt = $this->connection->prepare($sql);

        $this->bind($stmt, $this->where_data_binding);

        $this->where_data_binding = [];

        $stmt->execute();

        $r = $stmt->rowCount();

        return (int) $r;
    }
314908
public function actionDelete()
    {
        if(Yii::$app->request->isAjax)
        {
            $file_id = Yii::$app->request->post('file_id');
            $oneFile = OneFile::findOne($file_id);
            $modelName = $oneFile->model;
            $model = $modelName::findOne($oneFile->parent_id);

            $model->deleteFile($oneFile->name, $oneFile->subdir);
            $oneFile->delete();
            
            echo $file_id;
        }
    }
1284342
function delete()
	{
		if(!$this->post_id)
		{
			trigger_error('NO_POST', E_USER_ERROR);
		}

		$ret = delete_posts('post_id', $this->post_id);

		//remove references to the deleted post so calls to submit() will create a
		//new post instead of trying to update the post which does not exist anymore
		$this->post_id = NULL;

		return $ret;
	}
251436
public function actionDelete()
	{
		if(Yii::app()->request->isPostRequest)
		{
			// we only allow deletion via POST request
			$this->loadModel()->delete();

			// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
			if(!isset($_POST['ajax']))
				$this->redirect(array('index'));
		}
		else
			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
	}