Deletes the container contents related to the container
@param Container $item The container to be deleted
501200
public function BeforeDelete($item)
    {
       $contContainers = ContentContainer::Schema()->FetchByContainer(true, $item);
       $logger = new Logger(BackendModule::Guard()->GetUser());
       foreach ($contContainers as $contContainer)
       {
           $content = $contContainer->GetContent();
           $provider = ContentTreeUtil::GetTreeProvider($content);
           $tree = new TreeBuilder($provider);
           $logger->ReportContentAction($content, Action::Delete());
           $tree->Remove($provider->ItemByContent($content));
       }
    }
1089957
public function remove($item)
    {
        $key = $item instanceof Item ? $item->name : $item;

        if ($this->has($key)) {
            $this->forget($key);
            return true;
        }

        return false;
    }
1212553
protected function setFound($item, $item2)
    {
        if (isset($this->missing[$item])) {
            unset($this->missing[$item][$item2]);
            if (empty($this->missing[$item])) {
                unset($this->missing[$item]);
            }
        }
    }
957420
public function setItem($item)
    {
        $this->items[] = $item->expose();

        $this->totalWishlistValue += $item->getTotalValueOfProduct();
    }
474908
public function remove($item)
    {
        foreach ($this->currentList as $index => $candidate) {
            if ($candidate === $item) {
                unset($this->currentList[$index]);
            }
        }
    }
1133747
protected function persist(Item $item)
    {
        $this->em->persist($item);
        foreach ($item->getNames() as $name) {
            $this->em->persist($name);
        }
        foreach ($item->getSources() as $source) {
            $this->em->persist($source);
        }
    }
688385
private function removeItem($item, &$arr, $key) {
        $j = $this->findItem($item, $arr, $key);
        if($j !== false) {
            array_splice($arr, $j);
            return true;
        }
        return false;
    }
179080
public function removeItem(ItemInterface $item)
    {
        $item->setGrid(null);
        $this->items->removeElement($item);
    }
911543
public function deleteItemContent(core_kernel_classes_Resource $item)
    {
        // Delete item directory from filesystem
        $definitonFileValues = $item->getPropertyValues($this->itemContentProperty);
        if (!empty($definitonFileValues)) {
            /** @var Directory $directory */
            $directory = $this->getFileReferenceSerializer()->unserializeDirectory(reset($definitonFileValues));
            if ($directory->exists()) {
                $directory->deleteSelf();
            }
        }

        //delete the folder for all languages!
        foreach ($item->getUsedLanguages($this->itemContentProperty) as $lang) {
            $files = $item->getPropertyValuesByLg($this->itemContentProperty, $lang);
            foreach ($files->getIterator() as $file) {
                if ($file instanceof core_kernel_classes_Resource) {
                    $this->getFileReferenceSerializer()->cleanUp($file->getUri());
                }
            }
        }

        return true;
    }
297737
private function process_delete_request($item) {
        global $DB;

        $gradeitem = \grade_item::fetch(array('id' => $item->id));
        if (($gbs = gradebookservices::find_ltiservice_gradebookservice_for_lineitem($item->id)) == false) {
            throw new \Exception(null, 403);
        }
        if (!$gradeitem->delete('mod/ltiservice_gradebookservices')) {
            throw new \Exception(null, 500);
        } else {
            $sqlparams = array();
            $sqlparams['id'] = $gbs->id;
            if (!$DB->delete_records('ltiservice_gradebookservices', $sqlparams)) {
                throw new \Exception(null, 500);
            }
        }
    }
157513
public function deleteItem(ItemUUID $uuid)
    {
        $itemUUID = $uuid->composeUUID();
        $this->elementsToDelete[$itemUUID] = $uuid;
        unset($this->elementsToUpdate[$itemUUID]);
    }
139168
public function set(string $name, $item): void
    {
        $this->payloadContainerItems->set($name, $item);
    }
383645
public function remove($name, ItemInterface $item)
    {
        unset($this->relationships[$name][$item->getId()]);

        if (count($this->relationships[$name]) === 0) {
            unset($this->relationships[$name]);
        }
    }
610758
public function delete( $id ) {

		$container = $this->read( $id );

		foreach ( $container->getLinkedList() as $linkedId ) {
			$key = $this->getKey( (string)$linkedId );
			$this->cache->delete( $key );
			$this->internalCache->delete( $key );
		}

		$this->cache->delete( $this->getKey( $id ) );
		$this->internalCache->delete( $this->getKey( $id ) );
	}
679677
public function removeItem(\Flowcode\ShopBundle\Entity\InventoryItem $item)
    {
        $this->items->removeElement($item);
        $item->setInventory(null);
    }
1256615
public function removeItem(GridItem $gridItem)
    {
        if ($this->items->contains($gridItem)) {
            $this->items->removeElement($gridItem);
        }
    }
1016116
private function skip($item, $key): void
    {
        $this->shouldSkip = false;
        $this->eventDispatcher->dispatch(new ItemEvent(EtlEvents::SKIP, $item, $key, $this));
    }