Removes article action, returns true on success. For
performance - you can not load action object - just pass
action ID.

@param string $articleId Object ID

@return bool
775615
public function delete($articleId = null)
    {
        $articleId = $articleId ? $articleId : $this->getId();
        if (!$articleId) {
            return false;
        }

        // remove actions from articles also
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sDelete = "delete from oxactions2article where oxactionid = " . $oDb->quote($articleId) . " and oxshopid = '" . $this->getShopId() . "'";
        $oDb->execute($sDelete);

        return parent::delete($articleId);
    }
707858
public function deleteAction($categoryId, $keywordId)
    {
        $keyword = $this->getKeywordRepository()->findById($keywordId);
        $category = $this->getCategoryRepository()->findCategoryById($categoryId);
        $this->getKeywordManager()->delete($keyword, $category);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }
1253728
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $cmsTerm = $this->CmsTerm->get($id);
        if ($this->CmsTerm->delete($cmsTerm)) {
            $this->Flash->success('The cms term has been deleted.');
        } else {
            $this->Flash->error('The cms term could not be deleted. Please, try again.');
        }
        return $this->redirect(['action' => 'index']);
    }
546453
static function removeByObjectId( $contentobjectID, $contentobjectAttributeId = null )
    {
        $cond = array( 'contentobject_id' => $contentobjectID );
        if ( $contentobjectAttributeId !== null )
        {
            $cond['contentobject_attribute_id'] = $contentobjectAttributeId;
        }
        eZPersistentObject::removeObject( self::definition(), $cond );
    }
1166631
public function removeBlockAction($id)
    {
        /** @var BlockManager $manager */
        $manager  = $this->get('opifer.content.block_manager');
        $response = new JsonResponse;

        try {
            $block = $manager->find($id, true);
            $manager->remove($block, true);
            $response->setData(['state' => 'removed']);
        } catch (\Exception $e) {
            $response->setStatusCode(500);
            $response->setData(['error' => $e->getMessage()]);
        }

        return $response;
    }
328584
public function delete($id = null)
    {
        $this->request->allowMethod(['post', 'delete']);

        $category = $this->PagesCategories->get($id);

        //Before deleting, it checks if the category has some pages
        if (!$category->page_count) {
            $this->PagesCategories->deleteOrFail($category);
            $this->Flash->success(I18N_OPERATION_OK);
        } else {
            $this->Flash->alert(I18N_BEFORE_DELETE);
        }

        return $this->redirect(['action' => 'index']);
    }
702514
public function delete($id)
	{
		$id = trim($this->escape($id));
		$hits = $this->getIndex()->find("xref_id:\"{$id}\"");
		if (empty($hits)) {
			return false;
		}
		
		foreach ($hits as $hit) {
			$this->getIndex()->delete($hit->id);
		}
		
		return true;
	}
945213
public function destroyAction($actionId)
    {
        if (isset($this->manialinkByAction[$actionId])) {
            unset($this->actionsByManialink[$this->manialinkByAction[$actionId]->getId()][$actionId]);
            unset($this->actions[$actionId]);
        }
    }
944845
public function removeAction($mediaId)
    {
        $media = $this->getMedia($mediaId);
        $request = $this->getRequest();
        if ($request->request->get('confirm') === 'yes' || $request->get('confirm') === 'yes')
        {
            $this->get('fulgurio_light_cms.media_library')->remove($media);
            $em = $this->getDoctrine()->getManager();
            $em->remove($media);
            $em->flush();
            return $this->redirect($this->generateUrl('AdminMedias'));
        }
        else if ($request->request->get('confirm') === 'no')
        {
            return $this->redirect($this->generateUrl('AdminMedias', array('mediaId' => $mediaId)));
        }
        $templateName = $request->isXmlHttpRequest() ? 'FulgurioLightCMSBundle::adminConfirmAjax.html.twig' : 'FulgurioLightCMSBundle::adminConfirm.html.twig';
        return $this->render($templateName, array(
            'action' => $this->generateUrl('AdminMediasRemove', array('mediaId' => $mediaId)),
            'confirmationMessage' => $this->get('translator')->trans('fulgurio.lightcms.medias.delete_confirm_message', array('%FILENAME%' => $media->getOriginalName()), 'admin'),
        ));
    }
445818
public function delete($entityId)
    {
        $this->preDelete($entityId);
        $return = $this->doDelete($entityId);
        $this->postDelete($entityId);

        return $return;
    }
581393
public function removeAction($pageId)
    {
        $page = $this->getPage($pageId);
        if ($page->getSlug() == '')
        {
            throw new AccessDeniedException();
        }
        $request = $this->getRequest();
        if ($request->request->get('confirm') === 'yes')
        {
            if ($this->container->getParameter('fulgurio_light_cms.allow_recursive_page_delete') == FALSE
                    && $page->hasChildren())
            {
                $this->get('session')->getFlashBag()->add(
                        'error',
                        $this->get('translator')->trans('fulgurio.lightcms.pages.recursive_remove_not_allowed', array(), 'admin')
                );
                return $this->redirect($this->generateUrl('AdminPagesSelect', array('pageId' => $pageId)));
            }
            $em = $this->getDoctrine()->getManager();

            $em->remove($page);
            $em->flush();
            $this->get('session')->getFlashBag()->add(
                    'success',
                    $this->get('translator')->trans('fulgurio.lightcms.pages.delete_success_message', array(), 'admin')
            );
            if ($page->getParentId())
            {
                return $this->redirect($this->generateUrl('AdminPagesSelect', array('pageId' => $page->getParentId())));
            }
            return $this->redirect($this->generateUrl('AdminPages'));
        }
        else if ($request->request->get('confirm') === 'no')
        {
            return $this->redirect($this->generateUrl('AdminPagesSelect', array('pageId' => $pageId)));
        }
        $templateName = $request->isXmlHttpRequest() ? 'FulgurioLightCMSBundle::adminConfirmAjax.html.twig' : 'FulgurioLightCMSBundle::adminConfirm.html.twig';
        return $this->render($templateName, array(
            'action' => $this->generateUrl('AdminPagesRemove', array('pageId' => $pageId)),
            'confirmationMessage' => $this->get('translator')->trans('fulgurio.lightcms.pages.delete_confirm_message', array('%title%' => $page->getTitle()), 'admin'),
        ));
    }
1346488
public function deleteContent($contentId)
    {
        try {
            return $this->innerGateway->deleteContent($contentId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
709409
public function removeItem($cacheId)
    {
        $cacheId = $this->normalizeKey($cacheId);

        try {
            return ($this->cache->delete($cacheId));
        } catch (ezcBaseException $ex) {
            return false;
        }
    }
1189051
public function remove($itemId)
    {
        $items = &$this->items;

        foreach ($items as $position => $item) {
            if ($itemId === $item->id) {
                unset($items[$position]);
            }
        }
    }
1260474
public function delete($id)
	{
		try {
			$this->getClient()->get(array(
				'index' => $this->name,
				'type'  => static::$default_type,
				'id'    => $id,
			));
		} catch (\Elasticsearch\Common\Exceptions\Missing404Exception $e) {
			return false;
		}
		
		$doc = $this->getClient()->delete(array(
			'index' => $this->name,
			'type'  => static::$default_type,
			'id'    => $id,
		));
		
		return true;
	}
1028366
public function delete(Article $article)
    {
        $bep = $this->pageHelper->findPageByParameters(
            [
                'templateId' => $article->getTemplate()->getId(),
                'entityId'   => $article->getId(),
            ]
        );
        $this->entityManager->remove($bep);

        $article->setVisibleOnFront(0);
        $article->setDeletedAt(new \DateTime());
        $article->setStatus(PageStatus::DELETED);

        $this->entityManager->flush();
    }
334211
public function removeAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $cart = $this->getCurrentCart();
        $repository = $em->getRepository('EcommerceBundle:CartItem');
        $item = $repository->find($id);

        if (!$item || false === $cart->hasItem($item)) {
            // Write flash message
            return $this->redirect($this->generateUrl('ecommerce_checkout_detail'));
        }

        // Update models
        $cart->removeItem($item);
        $cart->setTotalItems(count($cart->getItems()));
        $em->flush();
        // Write flash message

        return $this->redirect($this->generateUrl('ecommerce_checkout_detail'));
    }