public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['ownModel'] = 'Kwc_ImageResponsive_CreatesImgElement_Components_Image_TestModel';
     $ret['dimensions'] = array('default' => array('width' => 300, 'height' => 200, 'cover' => true), 'fullWidth' => array('text' => trlKwfStatic('full width'), 'width' => self::CONTENT_WIDTH, 'height' => 0, 'cover' => true), 'original' => array('text' => trlKwfStatic('original')), 'custom' => array('text' => trlKwfStatic('user-defined'), 'width' => self::USER_SELECT, 'height' => self::USER_SELECT, 'cover' => true));
     return $ret;
 }
 public static function validateSettings($settings, $componentClass)
 {
     parent::validateSettings($settings, $componentClass);
     if (isset($settings['useParentImage'])) {
         throw new Kwf_Exception("useParentImage doesn't exist anymore for Basic_Image, use Kwc_Basic_ImageParent_Component instead");
     }
 }
 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['dimensions'] = array('default' => array('text' => trlKwfStatic('default'), 'width' => 16, 'height' => 16, 'cover' => false));
     $ret['componentName'] = trlcKwfStatic('Flag of a Country', 'Flag');
     return $ret;
 }
 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['ownModel'] = 'Kwc_ImageResponsive_MediaOutput_Image_TestModel';
     $ret['dimensions'] = array('default' => array('width' => 200, 'height' => 200, 'cover' => true), 'default2' => array('text' => 'Default2', 'width' => 100, 'height' => 100, 'cover' => true));
     return $ret;
 }
Example #5
0
 public static function getSettings($masterImageComponentClass)
 {
     $ret = parent::getSettings($masterImageComponentClass);
     $ret['ownModel'] = 'Kwc_Abstract_Image_Trl_Image_Model';
     //dimesion wird autom. vom master verwendet
     $ret['masterImageComponentClass'] = $masterImageComponentClass;
     return $ret;
 }
 public function getImageData()
 {
     $ret = parent::getImageData();
     if (!$ret) {
         $ret = $this->getData()->parent->getComponent()->getImageData();
     }
     return $ret;
 }
Example #7
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 getImageData()
 {
     $ret = parent::getImageData();
     if ($ret && Kwc_Abstract::getSetting($this->_getSetting('masterImageComponentClass'), 'editFilename')) {
         $fn = $this->getData()->parent->getComponent()->getRow()->filename;
         if (!$fn) {
             $fn = $this->getData()->parent->chained->getComponent()->getRow()->filename;
         }
         if ($fn) {
             $fileRow = $this->getRow()->getParentRow('Image');
             $ret['filename'] = $fn . '.' . $fileRow->extension;
         }
     }
     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;
 }
 public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['dimensions'] = array('default' => array('text' => trlKwfStatic('default'), 'width' => 90, 'height' => 120, 'cover' => true));
     return $ret;
 }
 public static function getSettings($param = null)
 {
     $ret = parent::getSettings($param);
     $ret['dimensions'] = array('fullwidth' => array('text' => trlKwfStatic('full width'), 'width' => self::CONTENT_WIDTH, 'height' => 0, 'cover' => true));
     return $ret;
 }
Example #12
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['imgCssClass'] = $this->_getSetting('imgCssClass');
     return $ret;
 }