Returns an array of shopping cart items
@return array
766076
protected function getListCart()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->cart->getList($conditions);
        $this->prepareListCart($list);
        return $list;
    }
980765
public function getOrderItems()
    {
        if (\Yii::$app->user->isGuest) {
            $session = \Yii::$app->session;
            $products = $session[self::SESSION_KEY];
        } else {
            $order = Order::find()->where(['user_id' => \Yii::$app->user->id, 'status' => OrderStatus::STATUS_INCOMPLETE])->one();
            if (!empty($order))
                $products = OrderProduct::find()->asArray()->where(['order_id' => $order->id])->all();
        }
        return $products ?? false;
    }
387134
public function getItems()
    {
        $items = new ArrayList();

        // If the value has been set, use that
        if ($this->value != 'unchanged') {
            $sourceObject = $this->getSourceObject();
            if (is_array($sourceObject)) {
                $values = is_array($this->value) ? $this->value : preg_split('/ *, */', trim($this->value));

                foreach ($values as $value) {
                    $item = new stdClass;
                    $item->ID = $value;
                    $item->Title = $sourceObject[$value];
                    $items->push($item);
                }
                return $items;
            }

            // Otherwise, look data up from the linked relation
            if (is_string($this->value)) {
                $ids = explode(',', $this->value);
                foreach ($ids as $id) {
                    if (!is_numeric($id)) {
                        continue;
                    }
                    $item = DataObject::get_by_id($sourceObject, $id);
                    if ($item) {
                        $items->push($item);
                    }
                }
                return $items;
            }
        }

        if ($this->form) {
            $fieldName = $this->name;
            $record = $this->form->getRecord();
            if (is_object($record) && $record->hasMethod($fieldName)) {
                return $record->$fieldName();
            }
        }

        return $items;
    }
1277624
public function getFlatSubItems()
    {
        $key = $this->getKey();
        $itemIds = Arr::get($this->_tree, $key);
        $flatItemIds = $this->_dot($itemIds, $key ? $key . '.' : '');
        $items = [];
        foreach ($flatItemIds as $itemId => $value) {
            $items[$itemId] = $this->_itemData[$itemId];
        }
        return $items;
    }
1265363
public function toArray(): array
    {
        return array_map(function ($value) {
            if (method_exists($value, 'toArray')) {
                return $value->toArray();
            }

            return $value;
        }, $this->items);
    }
1308705
protected function _getItemsData()
    {
        $items = [];

        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $productCollection = $this->getLayer()->getProductCollection();
        $optionsFacetedData = $productCollection->getFacetedData('categories');

        $currentCategory = $this->dataProvider->getCategory();
        $categories = $this->getChildrenCategories();

        if ($currentCategory->getIsActive()) {
            foreach ($categories as $category) {
                if (isset($optionsFacetedData[(int) $category->getId()])) {
                    $productCount = $optionsFacetedData[$category->getId()]['count'];
                    if ($category->getIsActive() && $productCount > 0) {
                        $item = [
                            'label' => $this->escaper->escapeHtml($category->getName()),
                            'value' => $category->getId(),
                            'count' => $optionsFacetedData[$category->getId()]['count'],
                            'url'   => $category->getUrl(),
                        ];

                        $items[] = $item;
                    }
                }
            }
        }

        return $items;
    }
253232
protected function getItemLines()
    {
        $result = array();

        $orderProducts = $this->getOrderModel()->getOrderProducts($this->invoiceSource->getId());
        foreach ($orderProducts as $line) {
            $result[] = $this->getItemLine($line);
        }

        return $result;
    }
1180428
public function toArray()
    {
        return [
            'name'                  => $this->name,
            'item_type'             => $this->item_type,
            'quantity'              => $this->quantity,
            'unit_price'            => CurrencyUtils::amountToExponent($this->unit_price, $this->currency),
            'tax_rate'              => CurrencyUtils::amountToExponent($this->tax_rate, $this->currency),
            'total_discount_amount' => CurrencyUtils::amountToExponent($this->total_discount_amount, $this->currency),
            'total_amount'          => CurrencyUtils::amountToExponent($this->getTotalAmount(), $this->currency),
            'total_tax_amount'      => CurrencyUtils::amountToExponent($this->getTotalTaxAmount(), $this->currency),
            'reference'             => $this->reference,
            'image_url'             => $this->image_url,
            'product_url'           => $this->product_url,
            'quantity_unit'         => $this->quantity_unit,
            'product_identifiers'   => $this->getProductIdentifiersParamsStructure(),
            'merchant_data'         => $this->getMerchantDataParamsStructure()
        ];
    }
786555
public function getItems()
	{
		/**
		 * @var array $res
		 */
		$res = array();
		foreach ( $this->iter as /** @var XPathItem $item */ $item )
		{
			if ( count( $res ) == 10)
				break;

			$res[] = $item->CloneInstance();
		}

		return $res;
	}
795923
public function getItemUrlArray()
    {
        return array(
            \MUtil_Model::REQUEST_ID1 => $this->_getParam(\MUtil_Model::REQUEST_ID1),
            \MUtil_Model::REQUEST_ID2 => $this->_getParam(\MUtil_Model::REQUEST_ID2),
            );
    }
280335
public function items() {
    if (!isset($this->cart, $this->cart->items)) {
      return [];
    }

    $items = $this->cart->items;

    foreach ($items as &$item) {
      if (!isset($item['sku'])) {
        continue;
      }

      $sku = SKU::loadFromSku($item['sku']);

      if (!($sku instanceof SKU)) {
        // We may have some products in cart which are now deleted in Drupal.
        // This can happen when an item is blocked or deleted in Magento.
        $this->logger->warning('Invalid SKU @sku found in Cart id: @cart_id.', [
          '@sku' => $item['sku'],
          '@cart_id' => $this->id(),
        ]);

        // Remove the item from cart in session.
        $this->removeItemFromCart($item['sku']);

        // Continue to next item, this item is removed in call above.
        continue;
      }

      // Get Plugin instance from SKU entity.
      $plugin = $sku->getPluginInstance();

      $item['name'] = $plugin->cartName($sku, $item);
    }

    return $items;
  }
1357673
public function getBasketItems()
    {
        if ($this->_aBasketItemList === null) {
            $this->_aBasketItemList = false;

            // passing basket articles
            if ($oBasket = $this->getSession()->getBasket()) {
                $this->_aBasketItemList = $oBasket->getBasketArticles();
            }
        }

        return $this->_aBasketItemList;
    }
476623
public function getRequestItems()
    {
        $items = [];
        foreach ($this->items as $key => $value) {
            $items[] = [
                'Tag' => $key,
                'Value' => $value
            ];
        }
        return $items;
    }
210503
public function getItems()
    {
        if (is_array($this->items)) {
            $this->items = new static($this->items, $this->serviceDescription);
            $this->items->setParent($this);
        }

        return $this->items;
    }
1261978
protected function getOrderCollection()
    {
        $session = $this->getRequest()->getSession();

        $orderCollection = $this->getRepo('OrderCollection')
            ->find($session->get('cart_id'));

        return $orderCollection;
    }
737596
public function AllSuccessArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allSuccess());
        }
        return $r;
    }
1252140
public function get_flat_items() {
		$flat_items = array();

		foreach ( $this->items as $priority => $items ) {
			$flat_items = array_merge( $flat_items, $items );
		}

		return $flat_items;
	}