示例#1
0
 /**
  * @param Market $market
  * @return array
  */
 public function getProductArray(Market $market)
 {
     $products = [];
     foreach ($market->getMarketProducts() as $product) {
         $new = $product->getProductVariantSku()->toArray();
         $new['foreign_id'] = $product->getForeignId();
         $products[] = $new;
     }
     return $products;
 }
示例#2
0
 /**
  * Remove market
  *
  * @param \AppBundle\Entity\Market $market
  */
 public function removeMarket(\AppBundle\Entity\Market $market)
 {
     $this->markets->removeElement($market);
 }