deletes an article with a reason
978231
public void delete(String title, String reason) {
    getPerformedAction(new PostDelete(getUserinfo(), title, reason));
  }
608466
public function deleteThisArticle()
    {
        // get article id
        $sOrderArtId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('sArtID');
        $sOrderId = $this->getEditObjectId();

        $oOrderArticle = oxNew(\OxidEsales\Eshop\Application\Model\OrderArticle::class);
        $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);

        // order and order article exits?
        if ($oOrderArticle->load($sOrderArtId) && $oOrder->load($sOrderId)) {
            // deleting record
            $oOrderArticle->delete();

            // recalculating order
            $oOrder->recalculateOrder();
        }
    }
1239008
def delete(self, **kwargs):
        """"""
        self.method = 'delete'
        if len(kwargs) > 0:
            self.load(self.client.delete(self.url, params=kwargs))
        else:
            self.load(self.client.delete(self.url))
        self.parent.remove(self)
        return
1274405
def delete(self) :
        ""
        if self.URL is None :
            raise DeletionError("Can't delete a document that was not saved")
        r = self.connection.session.delete(self.URL)
        data = r.json()

        if (r.status_code != 200 and r.status_code != 202) or 'error' in data :
            raise DeletionError(data['errorMessage'], data)
        self.reset(self.collection)

        self.modified = True
373056
public function removeArticle()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) {
            return;
        }

        if (!$this->getViewConfig()->getShowListmania()) {
            return;
        }

        if (($sArtId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('aid')) &&
            ($oRecommList = $this->getActiveRecommList())
        ) {
            $oRecommList->removeArticle($sArtId);
        }
        $this->_sThisTemplate = 'page/account/recommendationedit.tpl';
    }
499060
def delete(self):
        """"""
        response = self.http_request(self._url, 'DELETE')
        if response.status != 204:
            self.raise_http_error(response)
632059
public function deleteAction(Article $article)
    {
        $blogViewReference = $this->container->get('victoire_view_reference.repository')
            ->getOneReferenceByParameters(['viewId' => $article->getBlog()->getId()]);

        $this->get('victoire_blog.manager.article')->delete($article);

        $message = $this->get('translator')->trans('victoire.blog.article.delete.success', [], 'victoire');
        $this->congrat($message);

        $response = [
            'success' => true,
            'url'     => $this->generateUrl('victoire_core_page_show', [
                    'url' => $blogViewReference->getUrl(),
                ]
            ),
            'message' => $message,
        ];

        return new JsonResponse($response);
    }
1075188
def deleteLink(self, linkdict):
        """"""
        CheckParent(self)

        val = _fitz.Page_deleteLink(self, linkdict)
        if linkdict["xref"] == 0: return
        linkid = linkdict["id"]
        try:
            linkobj = self._annot_refs[linkid]
            linkobj._erase()
        except:
            pass


        return val
157736
def delete(url)
      parameters = Specification.new(url: Types::URL).parameters(url: url)
      @client.action('/posts/delete', parameters)
      self
    end
867141
def delete(self, uid):
        '''
        
        '''
        if self.check_post_role()['DELETE']:
            pass
        else:
            return False

        histinfo = MWikiHist.get_by_uid(uid)
        if histinfo:
            pass
        else:
            return False

        postinfo = MWiki.get_by_uid(histinfo.wiki_id)
        MWikiHist.delete(uid)
        self.redirect('/wiki_man/view/{0}'.format(postinfo.uid))
646284
function removeArticle(summary, level) {
    // Coerce to level
    level = is.string(level)? level : level.getLevel();

    var parent = summary.getParent(level);

    var articles = parent.getArticles();
    // Find the index to remove
    var index = articles.findIndex(function(art) {
        return art.getLevel() === level;
    });
    if (index === -1) {
        return summary;
    }

    // Remove from children
    articles = articles.remove(index);
    parent = parent.set('articles', articles);

    // Reindex the level from here
    parent = indexArticleLevels(parent);

    return mergeAtLevel(summary, parent.getLevel(), parent);
}
1030126
function (options, callback) {
  var Deleter = {}
  // Delete all docs with the IDs found in deleteBatch
  Deleter.deleteBatch = function (deleteBatch, APICallback) {
    tryDeleteBatch(options, deleteBatch, function (err) {
      return APICallback(err)
    })
  }
  // Flush the db (delete all entries)
  Deleter.flush = function (APICallback) {
    flush(options, function (err) {
      return APICallback(err)
    })
  }
  return callback(null, Deleter)
}
627600
public function delete()
    {
        if (!userHasPermission('admin:blog:post:' . $this->blog->id . ':delete')) {

            unauthorised();
        }

        // --------------------------------------------------------------------------

        //  Fetch and check post
        $iPostId = (int) $this->uri->segment(6);
        $oPost   = $this->blog_post_model->getById($iPostId);

        if (!$oPost || $oPost->blog->id != $this->blog->id) {

            $this->session->set_flashdata('error', 'I could\'t find a post by that ID.');
            redirect('admin/blog/post/index/' . $this->blog->id);
        }

        // --------------------------------------------------------------------------

        if ($this->blog_post_model->delete($iPostId)) {

            $sStatus  = 'success';
            $sMessage = ucfirst($this->data['postName']) . ' was deleted successfully. ';
            if (userHasPermission('admin:blog:post:' . $this->blog->id . ':restore')) {
                $sMessage .= anchor('admin/blog/post/restore/' . $this->blog->id . '/' . $iPostId, 'Undo?');
            }

            //  Update admin changelog
            $this->oChangeLogModel->add('deleted', 'a', 'blog post', $iPostId, $oPost->title);

        } else {

            $sStatus  = 'error';
            $sMessage = 'I failed to delete that post. ' . $this->blog_post_model->lastError();
        }

        $this->session->set_flashdata($sStatus, $sMessage);

        redirect('admin/blog/post/index/' . $this->blog->id);
    }
606619
function removeThis()
    {
        $itemOptionList = eZProductCollectionItemOption::fetchList( $this->attribute( 'id' ) );

        $db = eZDB::instance();
        $db->begin();
        foreach( $itemOptionList as $itemOption )
        {
            $itemOption->remove();
        }
        $this->remove();
        $db->commit();
    }
950917
public function removeArticle()
    {
        $aArticles = $this->_getActionIds('oxarticles.oxid');
        $sCategoryID = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('oxid');

        // adding
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sArticleTable = $this->_getViewName('oxarticles');
            $aArticles = $this->_getAll($this->_addFilter("select $sArticleTable.oxid " . $this->_getQuery()));
        }

        // adding
        if (is_array($aArticles) && count($aArticles)) {
            $this->removeCategoryArticles($aArticles, $sCategoryID);
        }

        $this->resetArtSeoUrl($aArticles, $sCategoryID);
        $this->resetCounter("catArticle", $sCategoryID);

        //notify services
        $relation = oxNew(\OxidEsales\Eshop\Application\Model\Object2Category::class);
        $relation->setCategoryId($sCategoryID);
        $this->dispatchEvent(new AfterModelUpdateEvent($relation));
    }
1303718
def pre_delete_title(instance, **kwargs):
    ''' 
    '''
    if instance.article.languages:
        languages = instance.article.languages.split(',')
    else:
        languages = []
    if instance.language in languages:
        languages.remove(instance.language)
        instance.article.languages = ','.join(languages)
        instance.article._publisher_keep_state = True
        instance.article.save(no_signals=True)
542302
def remove(self, document):
        
        assert '_id' in document, 'Document must have an id'
        self.db.execute("delete from %s where id = ?" % self.name, (document['_id'],))