コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function getId()
 {
     if ($this->__isInitialized__ === false) {
         return (int) parent::getId();
     }
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }