@param int $itemID

@return bool|\Colibri\Database\Model

@throws \OutOfBoundsException
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;
    }
1019051
public function loadItemData($itemId, int $status): array
    {
        $query = $this->getItemSelectQuery();
        $query->where(
            $query->expr()->eq('id', ':id')
        )
        ->setParameter('id', $itemId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
119697
public function get(string $id)
    {
        if (!isset($this->values[$id])) {
            throw new OutOfBoundsException("Value {$id} is not defined in the container");
        }
        if ($this->values[$id] instanceof Closure) {
            return $this->values[$id]($this);
        }

        return $this->values[$id];
    }
1013358
public function loadById($productId)
    {
        return $this->productRepository->getById($productId, false, $this->storeManager->getStore()->getId(), true);
    }
931129
public function removeItem($itemId, $user = null, $locale = null)
    {
        $cart = $this->getUserCart($user, $locale);

        $item = $this->orderManager->getOrderItemById($itemId, $cart->getEntity(), $hasMultiple);

        $this->orderManager->removeItem($item, $cart->getEntity(), !$hasMultiple);

        $this->orderManager->updateApiEntity($cart, $locale);

        return $cart;
    }
372141
public function getConfiguration($configurationId, $loadIntoDriver = false)
    {
        $dbConfiguration = IndexEngineDriverConfigurationQuery::create()->findPk($configurationId);

        if (null === $dbConfiguration) {
            throw new OutOfBoundsException(sprintf("The driver configuration id '%s' doesn't exist", $configurationId));
        }

        $driver = $this->driverRegistry->getDriver($dbConfiguration->getDriverCode());

        $configuration = $driver->getConfiguration();

        if (null !== $configuration) {
            $storedConfiguration = $dbConfiguration->getConfiguration();
            $configuration->loadValues($storedConfiguration);

            if (true === $loadIntoDriver) {
                $driver->loadConfiguration($configuration);
            }
        }

        return new DriverConfiguration($driver, $configuration);
    }
759712
public function setItem($row, $column, LayoutItem $item)
    {
        if ($this->rowExceedsMax($row)) {
            throw new OutOfBoundsException('You cannot add more than '.$this->getMaxRows().' rows');
        }

        if ($this->columnExceedsMax($column)) {
            throw new OutOfBoundsException('You cannot add more than '.$this->getMaxColumns().' columns');
        }

        $rowCount = $this->rowCount();
        $row = $row > $rowCount ? $rowCount : $row;

        if (!isset($this->_layout[$row])) {
            $this->_layout[$row] = [];
        }
        $this->_layout[$row][$column] = $item;

        $item->setRow($row);

        return $this;
    }
1253159
public function removeByID($itemID)
    {
        if (!is_numeric($itemID)) {
            throw new InvalidArgumentException("ManyManyThroughList::removeById() expecting an ID");
        }

        // Find has_many row with a local key matching the given id
        $hasManyList = $this->manipulator->getParentRelationship($this->dataQuery());
        $records = $hasManyList->filter($this->manipulator->getLocalKey(), $itemID);

        // Rather than simple un-associating the record (as in has_many list)
        // Delete the actual mapping row as many_many deletions behave.
        /** @var DataObject $record */
        foreach ($records as $record) {
            $record->delete();
        }
    }
164456
public function getItemById(string $itemId, bool $getChildren = false):array
    {
        $parameters = $getChildren === true ? '$expand=Children' : '';

        return $this->get("Items({$itemId})?{$parameters}");
    }
1006380
public function first()
    {
        if (empty($this->data)) {
            throw new OutOfBoundsException('Can\'t determine first item. Collection is empty');
        }

        \reset($this->data);

        return \current($this->data);
    }
302545
public function item($modelName, $itemId = 0)
    {
        $bladeName = 'admin.model.pages.form';
        \View::composer($bladeName, ModelViewComposer::class);
        parent::item($modelName, $itemId);

        return $this->view = view($bladeName, $this->view->getData());
    }
356220
public function offsetGet($offset)
	{
		if(array_key_exists($offset, $this->items))
		{
			return $this->items[$offset];
		}

		throw new OutOfBoundsException(vsprintf('Undefined offset [ %s ].', [$offset]));
	}
249546
public function findOne($id)
    {
        return ($itemArray = $this->getItemDataProvider($id)) ? $this->createItem($itemArray) : false;
    }
428577
public function containsItem(string $itemType, int $itemUid) : bool
    {
        return (bool)$this->getQueryBuilderForContainsMethods($itemType, $itemUid)->execute()->fetchColumn(0);
    }
1145405
public function deleteItem(string $itemType, int $itemUid = null)
    {
        $itemUids = empty($itemUid) ? [] : [$itemUid];
        $this->deleteItems([], [], [$itemType], $itemUids);
    }
1189051
public function remove($itemId)
    {
        $items = &$this->items;

        foreach ($items as $position => $item) {
            if ($itemId === $item->id) {
                unset($items[$position]);
            }
        }
    }
1297664
function getMediaItem($itemId)
    {
        $params = array(1, $this->username, $this->password, $itemId);

        return $this->sendRequest('wp.getMediaItem', $params);
    }