Delete Session instances items by IDs.

@param array $ids
Session instance items IDs.
494951
private function deleteCacheItems(array $ids) {
    $chunks = array_chunk($ids, 10);
    foreach ($chunks as $chunk) {
      $entities = SessionInstance::loadMultiple($chunk);
      $this->storage->delete($entities);
    }
  }
831971
public function deletePictures($ids)
    {
        $pictures = $this->pictures()->whereIn('id', $ids)->get();

        $pictures->each(function ($item) {
            $item->delete();
        });
    }
473304
public function deleteLocation($locations)
     {
         $delete_ids = (array) AnConfig::unbox($locations->id);

         foreach ($this->locations as $location) {
             if (in_array($location->id, $delete_ids)) {
                 if ($edge = $this->locations->find($location)) {
                     $edge->delete();
                 }
             }
         }
     }
700048
public function deleteMany(array $ids)
    {
        $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';

        if (method_exists($this, 'beforeDelete')) {
            $this->beforeDelete();
        }

        $this->qb->whereIn($primaryKey, $ids);

        if ($this->qb->table($this->table)->delete()) {
            if (method_exists($this, 'afterDelete')) {
                return $this->afterDelete();
            }

            return $this->db->getAffectedRows();
        }

        return false;
    }
497676
protected function detachUsingCustomClass($ids)
    {
        $results = 0;

        foreach ($this->parseIds($ids) as $id) {
            $results += $this->newPivot([
                $this->foreignPivotKey => $this->parent->{$this->parentKey},
                $this->relatedPivotKey => $id,
            ], true)->delete();
        }

        return $results;
    }
47955
public function deleteItems( array $ids )
	{
		$path = 'mshop/customer/manager/typo3/delete';
		$this->deleteItemsBase( $ids, $path, false, 'uid' );

		$manager = $this->getObject()->getSubManager( 'address' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.address.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );

		$manager = $this->getObject()->getSubManager( 'lists' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.lists.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );

		$manager = $this->getObject()->getSubManager( 'property' );
		$search = $manager->createSearch()->setSlice( 0, 0x7fffffff );
		$search->setConditions( $search->compare( '==', 'customer.property.parentid', $ids ) );
		$manager->deleteItems( array_keys( $manager->searchItems( $search ) ) );
	}
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;
   }
1015900
public function delete(array $ids)
    {
        if (!count($ids)) {
            return;
        }
        $ids_str = implode(',', $ids);
        $db = Db::obtain();
        $slots = $db->fetchArrayPDO(
            'SELECT id FROM ' . Db::realTablename('slots') . ' WHERE match_id IN (' . $ids_str . ')',
            array()
        );
        $slotsFormatted = array();
        foreach ($slots as $slot) {
            array_push($slotsFormatted, $slot['id']);
        }
        if (count($slotsFormatted)) {
            $slots_str = implode(',', $slotsFormatted);
            $db->exec('DELETE FROM ' . Db::realTablename('ability_upgrades') . ' WHERE slot_id IN (' . $slots_str . ')');
            $db->exec('DELETE FROM ' . Db::realTablename('additional_units') . ' WHERE slot_id IN (' . $slots_str . ')');
            $db->exec('DELETE FROM ' . Db::realTablename('slots') . ' WHERE id IN (' . $slots_str . ')');
        }
        $db->exec('DELETE FROM ' . Db::realTablename('picks_bans') . ' WHERE match_id IN (' . $ids_str . ')');
        $db->exec('DELETE FROM ' . Db::realTablename('matches') . ' WHERE match_id IN (' . $ids_str . ')');
    }
384980
private function deleteSessions(array $sessions)
    {
        // gRPC calls appear to cancel when the corresponding UnaryCall object
        // goes out of scope. Keeping the calls in scope allows time for the
        // calls to complete at the expense of a small memory footprint.
        $this->deleteCalls = [];

        foreach ($sessions as $session) {
            $this->deleteCalls[] = $this->database->connection()
                ->deleteSessionAsync([
                    'name' => $session['name'],
                    'database' => $this->database->name()
                ]);
        }
    }
190581
public function removePermission($ids)
    {
        $ids = is_array($ids) ? $ids : func_get_args();

        $this->permissions()->detach($ids);
    }
1086359
public function deleteRoles(array $ids): void
	{
		if ($this->isAjax()) {
			$roles = $this->orm->aclRoles->findById($ids);
			foreach ($roles as $role) {
				$this->orm->aclRoles->remove($role);
			}
			$this->orm->flush();
			$this['permissionsList']->reload();
		} else {
			$this->terminate();
		}
	}
1187477
public function delete_many(array $keys) {
        // The number of items that have actually being removed.
        $reduction = 0;
        foreach ($keys as $key) {
            if (isset($this->store[$key])) {
                $reduction++;
            }
            unset($this->store[$key]);
        }
        if ($this->maxsize !== false) {
            $this->storecount -= $reduction;
        }
        return $reduction;
    }
431382
public function forgetJobs($tags, $ids)
    {
        $this->connection()->pipeline(function ($pipe) use ($tags, $ids) {
            foreach ((array) $tags as $tag) {
                foreach ((array) $ids as $id) {
                    $pipe->zrem($tag, $id);
                }
            }
        });
    }
774314
public function deleteBatch(array $ids)
    {
        $supported = $this->isSupported('deleteBatch');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/batch/delete', array('ids' => $ids), 'DELETE') : $supported;
    }
1269976
public function execute($ids)
    {
        $storeIds = array_keys($this->storeManager->getStores());

        foreach ($storeIds as $storeId) {
            $dimension = $this->dimensionFactory->create(['name' => 'scope', 'value' => $storeId]);
            $this->indexerHandler->deleteIndex([$dimension], new \ArrayObject($ids));
            $this->indexerHandler->saveIndex([$dimension], $this->fullAction->rebuildStoreIndex($storeId, $ids));
        }
    }
421058
public function deleteMessages($ids)
    {
        foreach ($ids as $id) {
            imap_delete($this->imap, $id, FT_UID);
        };
        return imap_expunge($this->imap);
    }
1341474
public function deleteMonitored(array $ids)
    {
        $this->connection()->pipeline(function ($pipe) use ($ids) {
            foreach ($ids as $id) {
                $pipe->expireat($id, Chronos::now()->addDays(7)->getTimestamp());
            }
        });
    }