Removes the items with the specified ids from the database.
@param array|int[] $itemIds
7342
protected function removeIds(array $itemIds): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(Item::class, 'i')
                     ->andWhere('i.id IN (:itemIds)')
                     ->setParameter('itemIds', array_values($itemIds));

        $queryBuilder->getQuery()->execute();
    }
1144593
public function delete($itemId, $attachmentId, $optParams = array())
  {
    $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);
    $params = array_merge($params, $optParams);
    return $this->call('delete', array($params));
  }
568792
public function deleteItems(array $sites = [], array $indexQueueConfigurationNames = [], array $itemTypes = [], array $itemUids = [], array $uids = [])
    {
        $rootPageIds = Site::getRootPageIdsFromSites($sites);
        $indexQueueConfigurationList = implode(",", $indexQueueConfigurationNames);
        $itemTypeList = implode(",", $itemTypes);
        $itemUids = array_map("intval", $itemUids);
        $uids = array_map("intval", $uids);

        $queryBuilderForDeletingItems = $this->getQueryBuilder();
        $queryBuilderForDeletingItems->delete($this->table);
        $queryBuilderForDeletingItems = $this->addItemWhereClauses($queryBuilderForDeletingItems, $rootPageIds, $indexQueueConfigurationList, $itemTypeList, $itemUids, $uids);

        $queryBuilderForDeletingProperties = $this->buildQueryForPropertyDeletion($queryBuilderForDeletingItems, $rootPageIds, $indexQueueConfigurationList, $itemTypeList, $itemUids, $uids);

        $queryBuilderForDeletingItems->getConnection()->beginTransaction();
        try {
            $queryBuilderForDeletingItems->execute();
            $queryBuilderForDeletingProperties->execute();

            $queryBuilderForDeletingItems->getConnection()->commit();
        } catch (\Exception $e) {
            $queryBuilderForDeletingItems->getConnection()->rollback();
            throw $e;
        }
    }
877626
public function removeGroups(array $groupIds)
    {
        array_walk($groupIds, function(&$item) {$item = new \MongoId($item);});

        $this->createQueryBuilder()
            ->updateMany()
            ->field('id')->in($groupIds)
            ->field('deleted')->set(true)
            ->getQuery()
            ->execute();
    }
614421
public function remove($items)
    {
        if (!is_array($items)) {
            $items = array($items);
        }

        $allItems = $this->getAll();

        foreach ($items as $item) {
            $existingIndex = array_search($item, $allItems);
            if ($existingIndex === false) {
                return;
            }

            unset($allItems[$existingIndex]);
        }

        $this->setAll(array_values($allItems));
    }
379686
public static function delete_data_for_instances(\context $context, array $itemids = []) {
        global $DB;
        $itemsql = '';
        $params = ['contextid' => $context->id];
        if (!empty($itemids)) {
            list($itemsql, $itemparams) = $DB->get_in_or_equal($itemids, SQL_PARAMS_NAMED);
            $params = array_merge($params, $itemparams);
            $itemsql = "AND itemid $itemsql";
        }
        $sql = "SELECT gi.id AS instanceid, gd.id, gd.method
                  FROM {grading_definitions} gd
                  JOIN {grading_instances} gi ON gi.definitionid = gd.id
                  JOIN {grading_areas} ga ON ga.id = gd.areaid
                 WHERE ga.contextid = :contextid $itemsql";
        $records = $DB->get_records_sql($sql, $params);
        if ($records) {
            $firstrecord = current($records);
            $method = $firstrecord->method;
            $instanceids = array_map(function($record) {
                return $record->instanceid;
            }, $records);
            manager::component_class_callback(
                "gradingform_{$method}",
                gradingform_provider_v2::class,
                'delete_gradingform_for_instances',
                [$instanceids]);
            // Delete grading_instances rows.
            $DB->delete_records_list('grading_instances', 'id', $instanceids);
        }
    }
117572
public function deleteEvents(array $eventIds)
    {
        $connection = $this->getConnection();
        $connection->delete($this->getMainTable(), $connection->quoteInto('event_id IN(?)', $eventIds));
    }
841606
public function deleteItem($id)
    {
        $updatedItems = $this->values['items'];
        foreach ($updatedItems as $index => $item) {
            if ($item['id'] == $id) {
                unset($updatedItems[$index]);
            }
        }
        $this->values['items'] = array_values($updatedItems);
    }
910850
public final function deleteItems(array $keys)
   {
       try {
           foreach ($keys as $value) {
               if (!$this->deleteItem($value)) {
                   return false;
               }
           }
       } catch (InvalidArgumentException $e) {
           throw $e;
       }
       return true;
   }
688245
public static function delete_instance_data(\context $context, int $itemid = null) {
        if (is_null($itemid)) {
            self::delete_data_for_instances($context);
        } else {
            self::delete_data_for_instances($context, [$itemid]);
        }
    }
383403
public function delete($keys)
    {
        $keys = (array) $keys;

        foreach ($keys as $key) {
            if ($this->exists($this->items, $key)) {
                unset($this->items[$key]);

                continue;
            }

            $items = &$this->items;
            $segments = explode('.', $key);
            $lastSegment = array_pop($segments);

            foreach ($segments as $segment) {
                if (!isset($items[$segment]) || !is_array($items[$segment])) {
                    continue 2;
                }

                $items = &$items[$segment];
            }

            unset($items[$lastSegment]);
        }
    }
403276
public function remove($id)
    {
        $id   = $this->validateAndResolveId($id);
        $path = $this->items[$id][self::PATH];

        // remove item from hierarchy
        $this->hierarchy->remove($path);
        // remove item
        unset($this->items[$id]);
        $this->aliases->removeById($id);
        unset($this->blockThemes[$id]);
        // remove all children
        $pathLength    = count($path);
        $pathLastIndex = $pathLength - 1;
        $ids           = array_keys($this->items);
        foreach ($ids as $itemId) {
            $currentPath = $this->items[$itemId][self::PATH];
            if (count($currentPath) > $pathLength && $currentPath[$pathLastIndex] === $id) {
                unset($this->items[$itemId]);
                $this->aliases->removeById($itemId);
                unset($this->blockThemes[$itemId]);
            }
        }
    }
1129298
protected function removeListItems( $productId )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'product/lists' );

		$search = $manager->createSearch();
		$expr = array(
			$search->compare( '==', 'product.lists.parentid', $productId ),
			$search->compare( '==', 'product.lists.domain', 'product' ),
			$search->compare( '==', 'product.lists.type', 'bought-together' ),
		);
		$search->setConditions( $search->combine( '&&', $expr ) );

		$listItems = $manager->searchItems( $search );

		$manager->deleteItems( array_keys( $listItems ) );
	}
265254
function remove_sticky( $ids ) {
            if ( ! is_array( $ids ) ) {
                $ids = array( $ids );
            }

            foreach ( $ids as $id ) {
                // Remove from sticky storage.
                $this->_sticky_storage->remove( $id );

                if ( isset( $this->_notices[ $id ] ) ) {
                    unset( $this->_notices[ $id ] );
                }
            }
        }
327488
protected function delItem($itemID)
    {
        $pos = $this->indexOf($itemID);
        if ($pos == -1) {
            return false;
        }
        $item = $this->items[$pos];
        if ($pos != count($this->items) - 1) {
            $this->shiftLeftFromPos($pos + 1);
        }
        array_pop($this->items);

        return $item;
    }
815748
public void setItemIds(@Nullable ItemIds<? super T> itemIds) {
        if (this.itemIds != itemIds) {
            this.itemIds = itemIds;
            setHasStableIds(itemIds != null);
        }
    }
316527
public function deleteItems( array $ids )
	{
		$context = $this->_getContext();
		$config = $context->getConfig();

		$path = 'mshop/locale/manager/site/default/item/delete';
		$this->_deleteItems($ids, $config->get( $path, $path ), false );

		$path = 'mshop/locale/manager/site/cleanup/shop/domains';
		$default = array(
			'attribute', 'catalog', 'catalog/index', 'coupon', 'customer',
			'media', 'order', 'plugin', 'price', 'product', 'product/tag',
			'service', 'supplier', 'text'
		);

		foreach( $config->get( $path, $default ) as $domain ) {
			MShop_Factory::createManager( $context, $domain )->cleanup( $ids );
		}

		$path = 'mshop/locale/manager/site/cleanup/admin/domains';
		$default = array( 'job', 'log', 'cache' );

		foreach( $config->get( $path, $default ) as $domain ) {
			MAdmin_Factory::createManager( $context, $domain )->cleanup( $ids );
		}
	}