Exemple #1
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $protocol = 'http';
     $domain = $this->getData()->getDomain();
     $imageUrl = $this->getImageUrl();
     $ret['imageUrl'] = '';
     if ($imageUrl) {
         $ret['imageUrl'] = "{$protocol}://{$domain}{$imageUrl}";
     }
     return $ret;
 }
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $imageUrl = $this->getAbsoluteImageUrl();
     //always use http, see http://stackoverflow.com/a/8858052/781662
     if (substr($imageUrl, 0, 6) == 'https:') {
         $imageUrl = 'http:' . substr($imageUrl, 6);
     } else {
         if (substr($imageUrl, 0, 2) == '//') {
             $imageUrl = 'http:' . $imageUrl;
         }
     }
     $ret['imageUrl'] = $imageUrl;
     $ret['width'] = '';
     $ret['height'] = '';
     $imageDimensions = $this->getImageDimensions();
     if ($imageDimensions) {
         $ret['width'] = $imageDimensions['width'];
         $ret['height'] = $imageDimensions['height'];
     }
     return $ret;
 }
Exemple #3
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['imgCssClass'] = $this->_getSetting('imgCssClass');
     return $ret;
 }