Beispiel #1
0
 /**
  * Get image URL
  *
  * @return string
  */
 public function getURL()
 {
     $url = null;
     if ($this->getParam(self::PARAM_IMAGE) && $this->getParam(self::PARAM_IMAGE)->isExists()) {
         // Specified image
         $url = $this->getParam(self::PARAM_USE_CACHE) ? $this->resizedURL : $this->getParam(self::PARAM_IMAGE)->getFrontURL();
     }
     if (!$url && $this->getParam(self::PARAM_USE_DEFAULT_IMAGE)) {
         // Default image
         $url = \XLite::getInstance()->getOptions(array('images', 'default_image'));
         if (!\XLite\Core\Converter::isURL($url)) {
             $url = \XLite\Core\Layout::getInstance()->getResourceWebPath($url, \XLite\Core\Layout::WEB_PATH_OUTPUT_URL);
         }
     }
     return $url;
 }