/** * @param $number * @param \Shopware\Models\Category\Category $category * @param Supplier $manufacturer * @param ProductContext $context * @return array */ protected function getProduct($number, ProductContext $context, Category $category = null, Supplier $manufacturer = null) { $product = parent::getProduct($number, $context, $category); if ($manufacturer) { $product['supplierId'] = $manufacturer->getId(); } return $product; }
/** * {@inheritDoc} */ public function getId() { if ($this->__isInitialized__ === false) { return (int) parent::getId(); } $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array()); return parent::getId(); }