*/ class Mage_XmlConnect_Model_Preview_Iphone extends Mage_XmlConnect_Model_Preview_Abstract { /** * Get application banner image url * * @throws Mage_Core_Exception * @return string */ public function getBannerImage() { $result = array(); $bannerImages = $this->getImageModel() ->getDeviceImagesByType(Mage_XmlConnect_Model_Device_Iphone::IMAGE_TYPE_PORTRAIT_BANNER); if (!empty($bannerImages)) { $width = Mage_XmlConnect_Model_Device_Iphone::PREVIEW_PORTRAIT_BANNER_WIDTH; $height = Mage_XmlConnect_Model_Device_Iphone::PREVIEW_PORTRAIT_BANNER_HEIGHT; foreach ($bannerImages as $banner) { if (!isset($banner['image_file'])) { continue; } $result[] = $this->getImageModel()->getCustomSizeImageUrl($banner['image_file'], $width, $height); } } else { $result[] = $this->getPreviewImagesUrl('banner.png'); } return $result; } /** * Get background image url according device type * * @return string */ public function getBackgroundImage() { $configPath = 'conf/body/backgroundImage'; $imageUrlOrig = $this->getData($configPath); if ($imageUrlOrig) { $backgroundImage = $imageUrlOrig; } else { $backgroundImage = $this->getPreviewImagesUrl('background.png'); } return $backgroundImage; } }