Return list of the product relatedd variables (id, label, sku)

@return array
970602
private function getProductVariables()
    {
        $variables = [];

        if ($this->registry->registry('current_product')) {
            $product = $this->registry->registry('current_product');
            $variables['product.id'] = $product->getId();
            $variables['product.label'] = $product->getName();
            $variables['product.sku'] = $product->getSku();
        }

        return $variables;
    }
402306
protected function getListCart()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->cart->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('user')) {
            return $this->cart->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('sku')) {
            return $this->cart->getList(array('sku' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('order')) {
            return $this->cart->getList(array('order_id' => $id, 'limit' => $this->getLimit()));
        }

        if ($this->getParam('store')) {
            return $this->cart->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->cart->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
302845
protected function getIDListFromDB() : array
    {
        $arElementIDList = (array) Product::getByCategory($this->sValue)
            ->where('brand_id', '>', 0)
            ->lists('brand_id', 'id');

        $obCategory = Category::find($this->sValue);
        if (!empty($obCategory)) {
            $arAdditionalElementIDList = (array) $obCategory->product_link()
                ->where('brand_id', '>', 0)
                ->lists('brand_id', 'id');

            $arElementIDList = $arElementIDList + $arAdditionalElementIDList;
        }

        return $arElementIDList;
    }
482712
private function getLayerVariables()
    {
        $variables = [];
        $layer     = $this->catalogLayer;

        if ($layer) {
            $layerState = $layer->getState();
            foreach ($layerState->getFilters() as $currentFilter) {
                $identifier = $currentFilter->getRequestVar();

                if ($currentFilter->getFilter()) {
                    $identifier = $currentFilter->getFilter()->getRequestVar();
                }

                $filterValue = $this->getRequest()->getParam($identifier, '');
                if (is_array($filterValue)) {
                    $filterValue = implode('|', $filterValue);
                }
                $variables['product_list.filters.' . $identifier] = html_entity_decode($filterValue);
            }
        }

        return $variables;
    }
1132298
public function variables()
    {
        return [
            'id'         => $this->elementId,
            'tools'      => $this->tools->render(),
            'items'      => $this->getItems(),
            'useCreate'  => $this->useCreate,
            'useSave'    => $this->useSave,
            'useRefresh' => $this->useRefresh,
        ];
    }
18299
public static function getChoices()
    {
        return [
            self::PHYSICAL     => 'ekyna_product.type.'.self::PHYSICAL,
            self::VIRTUAL      => 'ekyna_product.type.'.self::VIRTUAL,
            self::DOWNLOADABLE => 'ekyna_product.type.'.self::DOWNLOADABLE,
        ];
    }
511529
public function getWishProductList()
    {
        if ($this->_aWishProductList === null) {
            $this->_aWishProductList = false;
            if ($oWishList = $this->getWishList()) {
                $this->_aWishProductList = $oWishList->getArticles();
            }
        }

        return $this->_aWishProductList;
    }
13734
public function getSaleProductList()
    {
        $saleProducts = SaleProductQuery::create()->filterBySaleId($this->getId())->groupByProductId()->find();

        return $saleProducts;
    }
52027
private function getQuoteProducts()
    {
        $products = [];
        $params = $this->_request->getParams();

        if (! isset($params['quote_id']) || ! isset($params['code']) || ! $this->helper->isCodeValid($params['code'])) {
            $this->helper->log('Feefo no quote id or code is set');

            return $products;
        }

        $quoteId = (int) $params['quote_id'];

        $quoteModel = $this->quoteFactory->create();
        $this->quoteResource->load($quoteModel, $quoteId);

        if (! $quoteModel->getId()) {
            return $products;
        }

        $productCollection = $this->review->getProductCollection($quoteModel);

        foreach ($productCollection as $product) {
                $products[$product->getSku()] = $product->getName();
        }
        return $products;
    }
777211
public function getAttributes()
    {
        return [
            Attributes\IdAttribute::make(),
            Attributes\UuidAttribute::make(),
            Attributes\TextAttribute::make('name')
                ->setRequired(true),
            Attributes\TextAttribute::make('code'),
            Attributes\LongTextAttribute::make('description'),
            Attributes\BelongsToAttribute::make('type_id')
                ->setRelationName('type')
                ->setRelationManager(ProductTypeManager::class),
            Attributes\BelongsToAttribute::make('parent_id')
                ->setRelationName('parent')
                ->setRelationManager(ProductManager::class),
            Attributes\BelongsToAttribute::make('supplier_id')
                ->setRelationName('supplier')
                ->setRelationManager(SupplierManager::class),
            Attributes\CreatedAtAttribute::make(),
            Attributes\UpdatedAtAttribute::make(),
            Attributes\DeletedAtAttribute::make(),
        ];
    }
980317
public function getRelatedCompanyIdsByIdProductList(int $idProductList): array
    {
        /** @var \Orm\Zed\ProductList\Persistence\SpyProductListCompanyQuery $productListCompanyQuery */
        $productListCompanyQuery = $this->getFactory()
            ->createProductListCompanyQuery()
            ->select(SpyProductListCompanyTableMap::COL_FK_COMPANY);

        return $productListCompanyQuery
            ->findByFkProductList($idProductList)
            ->toArray();
    }
282898
private function getOrderItemVariables($item, $itemId)
    {
        $variables = [];

        if (!$item->isDummy()) {
            $prefix = "order.items.$itemId";
            $variables[$prefix . '.sku']        = $item->getSku();
            $variables[$prefix . '.product_id'] = $item->getProductId();
            $variables[$prefix . '.qty']        = $item->getQtyOrdered();
            $variables[$prefix . '.price']      = $item->getBasePrice();
            $variables[$prefix . '.row_total']  = $item->getRowTotal();
            $variables[$prefix . '.label']      = $item->getName();
            $variables[$prefix . '.salesrules'] = $item->getAppliedRuleIds();

            $product = $item->getProduct();
            if ($product) {
                $categoriesId = $product->getCategoryIds();
                if (count($categoriesId)) {
                    $variables[$prefix . '.category_ids'] = implode(",", $categoriesId);
                }
            }
        }

        return $variables;
    }
677228
protected function GetDescriptionVariables()
    {
        $aParameter = parent::GetDescriptionVariables();

        // add some data about the order so that we can display the details on the closing page
        $oUserOrder = &TShopBasket::GetLastCreatedOrder();
        if (!is_null($oUserOrder)) {
            foreach ($oUserOrder as $sProperty => $sPropertyValue) {
                if ('field' == substr($sProperty, 0, 5)) {
                    $aParameter[$sProperty] = $sPropertyValue;
                }
            }
            $aParameter['sOrderNumber'] = $oUserOrder->fieldOrdernumber;
        }

        $oShop = TdbShop::GetInstance();
        // add link to display a printable version of the order
        $aParameter['sLinkPrintableVersion'] = $oShop->GetLinkToSystemPage('print-order', array('id' => $oUserOrder->id));
        $aParameter[strtolower('sLinkPrintableVersion')] = $aParameter['sLinkPrintableVersion']; // links should be all lowercase - some customers force this (and some wysiwyg may require this as well) so we provide both variations
        $aParameter['oLastOrder'] = $oUserOrder;

        return $aParameter;
    }
73781
private function getUnsortedProductData()
    {
        $productCollection = $this->getProductCollection()->setPageSize($this->size);

        if (!in_array($this->search, [null, ''])) {
            $productCollection->setSearchQuery($this->search);
        }

        return ['products' => $productCollection->getItems(), 'size' => $productCollection->getSize()];
    }
1365179
public function getLoadedProductCollection()
    {
        $params = $this->getRequest()->getParams();
        if (! isset($params['code']) || ! $this->helper->isCodeValid($params['code'])) {
            $this->helper->log('Best sellers no valid code is set');
            return [];
        }

        //mode param grid/list
        $mode = $this->getRequest()->getActionName();
        //limit of the products to display
        $limit = $this->recommnededHelper->getDisplayLimitByMode($mode);
        //date range
        $from = $this->recommnededHelper->getTimeFromConfig($mode);
        $to = $this->_localeDate->date()->format(\Zend_Date::ISO_8601);
        $storeId = $this->_storeManager->getStore()->getId();

        return $this->catalog->getBestsellerCollection($from, $to, $limit, $storeId);
    }
2176
private function getAllCustomFields() {
    $fields = [];

    $this->moduleHandler->alter('acm_sku_base_field_additions', $fields);

    foreach ($fields as $field_code => $field) {
      $fields[$field_code] = $this->applyDefaults($field_code, $field);
    }

    return $fields;
  }
7249
public function findAllBySku($sku)
    {

        // prepare the params
        $params = array(MemberNames::SKU => $sku);

        // initialize the array for the category product relations
        $categoryProducts = array();

        // load and return the product category relation for the passed product SKU
        $this->categoryProductsBySkuStmt->execute($params);

        // prepare the result by using the category ID as key
        foreach ($this->categoryProductsBySkuStmt->fetchAll(\PDO::FETCH_ASSOC) as $categoryProduct) {
            $categoryProducts[$categoryProduct[MemberNames::CATEGORY_ID]] = $categoryProduct;
        }

        // return the category product relations
        return $categoryProducts;
    }