예제 #1
0
 /**
  * Converts a shop doctrine model to a shop struct
  * @param \Shopware\Models\Shop\Shop $shop
  * @return Struct\Shop
  */
 public function convertShop(Models\Shop\Shop $shop)
 {
     $struct = new Struct\Shop();
     $struct->setId($shop->getId());
     $struct->setName($shop->getName());
     $struct->setHost($shop->getHost());
     $struct->setPath($shop->getBasePath());
     $struct->setUrl($shop->getBaseUrl());
     $struct->setSecure($shop->getSecure());
     $struct->setSecureHost($shop->getSecureHost());
     $struct->setSecurePath($struct->getSecurePath());
     if ($shop->getCategory()) {
         $struct->setCategory($this->convertCategory($shop->getCategory()));
     }
     return $struct;
 }