예제 #1
0
 /**
  * Assemble variant image data 
  * 
  * @param \XLite\Module\XC\ProductVariants\Model\Image\ProductVariant\Image $image Image
  *  
  * @return array
  */
 protected function assembleVariantImageData(\XLite\Model\Base\Image $image)
 {
     $result = array('full' => array($image->getWidth(), $image->getHeight(), $image->getURL(), $image->getAlt()));
     foreach ($this->getImageSizes() as $name => $sizes) {
         $result[$name] = $image->getResizedURL($sizes[0], $sizes[1]);
         $result[$name][3] = $image->getAlt();
     }
     return $result;
 }
예제 #2
0
 /**
  * Get image URL (middle-size)
  *
  * @param \XLite\Model\Base\Image $image  Image
  * @param integer                 $width  Width limit OPTIONAL
  * @param integer                 $height Height limit OPTIONAL
  *
  * @return string
  */
 protected function getMiddleImageURL(\XLite\Model\Base\Image $image, $width = null, $height = null)
 {
     $result = $image->getResizedURL($width, $height);
     return $result[2];
 }