[DELETE] [/content/<id>]
Deletes an article
@param int $id   The Content id
770242
public function actionIndexDelete($id=NULL)
	{
		if (!$this->user->role->hasPermission('delete'))
			throw new CHttpException(403, Yii::t('Api.content', 'You do not have permission to delete entries.'));

		return $this->loadModel($id)->deleteAllByAttributes(array('id' => $id));
	}
471014
public function delete($id)
    {
        if ($id instanceof Zend_Search_Lucene_Search_QueryHit) {
            /* @var $id Zend_Search_Lucene_Search_QueryHit */
            $id = $id->id;
        }

        if ($id >= $this->_docCount) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Document id is out of the range.');
        }

        $segmentStartId = 0;
        foreach ($this->_segmentInfos as $segmentInfo) {
            if ($segmentStartId + $segmentInfo->count() > $id) {
                break;
            }

            $segmentStartId += $segmentInfo->count();
        }
        $segmentInfo->delete($id - $segmentStartId);

        $this->_hasChanges = true;
    }
1048699
public static function delete($id)
    {
        if (!\CIBlock::Delete($id)) {
            throw new \Exception('Ошибка при удалении инфоблока');
        }

        Logger::log("Удален инфоблок {$id}", Logger::COLOR_GREEN);
    }
49752
public static function destroy($id) 
    {
        try {
            $file = self::find($id);
            
            if($file->descendants()->exists()) {
                foreach($file->descendants()->where('type', '!=', 'folder')->get() as $descendant) {
                    
                    event(new FileWasDeleted([ // fire 'file deleted' event for each descendant
                        'file' => $descendant
                    ]));
                }
            }
            
            $file->delete($id);

            if($file->type != 'folder') {
                event(new FileWasDeleted([ // fire 'file deleted' event for file
                    'file' => $file
                ]));
            }
        }
        
        catch (Exception $e) {
            throw $e;
        }
    }
1304156
public function delete($id=null)
    {
      if ($id) {
        $url = URIResource::Make($this->path, array($id));
      } else {
        $url = URIResource::Make($this->path, array($this->id));
      }

      $this->client->delete($url);
    }
449607
public function deleteById(string $id = '') : bool
    {
        $node = $this->mainNode->getById($id);

        if (empty($node)) {
            true;
        }

        return ($node->delete() ? true : false);
    }
1098347
public function delete(string $id = null): void
    {
        $this->request->allowMethod(['post', 'delete']);
        $menuItem = $this->MenuItems->get($id);
        if ($this->MenuItems->delete($menuItem)) {
            $this->Flash->success((string)__('The menu item has been deleted.'));
        } else {
            $this->Flash->error((string)__('The menu item could not be deleted. Please, try again.'));
        }

        $this->redirect($this->referer());
    }
501660
public function removeElementFromTrash($id)
    {
        $query = $this->handler->createDeleteQuery();
        $query
            ->deleteFrom('ezcontentobject_trash')
            ->where(
                $query->expr->eq(
                    $this->handler->quoteColumn('node_id'),
                    $query->bindValue($id, null, \PDO::PARAM_INT)
                )
            );
        $query->prepare()->execute();
    }
401518
public function actionDelete($id)
    {
        if (Yii::$app->request->isAjax) {
            try {
                $this->service->remove($id);
                $this->output['status'] = 1;
            } catch (YiiException $e) {
                $this->output['errors'] = (array) $e->data;
            }
        }
    }
690010
public function delete($id)
    {
        $user = $this->findById($id);
        $eventData = $user;
        $user->delete();
        $this->event->fire('users.delete', array($eventData));
    }
121701
public function deleteRow (int $id) : bool
	{
		$this->id = $id;
		return $this->delete() ? TRUE : FALSE;
	}
983662
public function delete($id)
    {
        /** @var \Colibri\Database\Model $item */
        $item = new $this->itemClass();
        $item->delete($id);

        header(
            'Location: ' .
            (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/' . $this->division . '/' . $this->module)
        );
    }
190047
public function delete($id)
    {
        $this->loadModel('Taxonomy.Terms');
        $term = $this->Terms->get($id);
        $this->Terms->addBehavior('Tree', ['scope' => ['vocabulary_id' => $term->vocabulary_id]]);
        $this->Terms->removeFromTree($term);

        if ($this->Terms->delete($term)) {
            $this->Flash->success(__d('taxonomy', 'Term successfully removed!'));
        } else {
            $this->Flash->danger(__d('taxonomy', 'Term could not be removed, please try again'));
        }

        $this->title(__d('taxonomy', 'Delete Term'));
        $this->redirect($this->referer());
    }
596534
public static function remove_section( $id = '' ) {
		if ( ! in_array( $id, self::$sections_to_remove, true ) ) {
			self::$sections_to_remove[] = $id;
		}
	}
442178
public function actionDelete ($id)
		{
			$page = Page::findOne([ 'id' => $id ]);
			if ($page === null)
				Yii::$app->notification->errorToSession(Yii::tr('Given page does not exist.', [], 'page'));

			if ($page->delete())
				Yii::$app->notification->messageToSession(Yii::tr('Page has been deleted.', [], 'page'));
			else
				Yii::$app->notification->errorToSession(Yii::tr('Page has not been deleted.', [], 'page'));
			$this->redirect(Url::toRoute([ '/page/index' ]));
		}
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
88612
public function delete($id)
    {
        if ($this->_mails && isset($this->_mails[$id])) {
            $this->_mails[$id]['is_deleted'] = true;
        }
    }