/**
  * @return Product
  */
 public function setDataToObject()
 {
     $this->object->setSku($this->getFormattedData('sku', 'string'));
     $this->object->setName($this->getFormattedData('name', 'string'));
     $this->object->setPicture($this->getFormattedData('picture', 'string'));
     $this->object->setUrl($this->getFormattedData('url', 'string'));
     $this->object->setManufacturer($this->getFormattedData('manufacturer', 'string'));
     $this->object->setCategory($this->getFormattedData('category', 'string'));
     $this->object->setCategoryOuterId($this->getFormattedData('categoryOuterId', 'string'));
     $this->object->setIsDescription($this->getFormattedData('isDescription', 'integer'));
     $this->object->setStatus($this->getFormattedData('status', 'integer'));
     $this->object->setAvailableDate($this->getFormattedData('availableDate', 'date'));
     $this->object->setProductCreateDate($this->getFormattedData('productCreateDate', 'date'));
     parent::setDataToObject();
 }
示例#2
0
 protected function setObjects()
 {
     $this->object->setSku('');
     $this->object->setName('');
     $this->object->setPicture('');
     $this->object->setUrl('');
     $this->object->setManufacturer('');
     $this->object->setCategory('');
     $this->object->setProductCreateDate(new \DateTime());
     $object = new ProductInformation();
     $object->setInformationKey('i1');
     $object->setInformationValue('v4');
     $object->setProduct($this->object);
     $this->informationObjects[] = $object;
     $object = new ProductInformation();
     $object->setInformationKey('i2');
     $object->setInformationValue('v4');
     $object->setProduct($this->object);
     $this->informationObjects[] = $object;
 }