Ejemplo n.º 1
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $showPics = $this->_getRow()->show_pics;
     $ret['cssClass'] .= ' col' . $this->_getGalleryColumns();
     $ret['imagesPerLine'] = $this->_getGalleryColumns();
     if (!$ret['imagesPerLine']) {
         $ret['imagesPerLine'] = 1;
     }
     $ret['downloadAll'] = $this->getData()->getChildComponent('-downloadAll');
     if (($this->_getGalleryColumns() <= $showPics || $ret['imagesPerLine'] >= $showPics) && count($ret['children']) <= $showPics) {
         $ret['showPics'] = null;
     } else {
         $ret['showPics'] = $showPics;
     }
     return $ret;
 }
Ejemplo n.º 2
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $showPics = null;
     if ($this->_getSetting('showMoreLink')) {
         $showPics = $this->_getRow()->show_pics;
         $ret['moreButtonText'] = $this->_getPlaceholder('moreButton');
         if ($this->_getRow()->show_more_link_text) {
             $ret['moreButtonText'] = $this->_getRow()->show_more_link_text;
         }
     }
     $ret['rootElementClass'] .= ' col' . $this->_getGalleryColumns();
     $ret['imagesPerLine'] = $this->_getGalleryColumns();
     if (!$ret['imagesPerLine']) {
         $ret['imagesPerLine'] = 1;
     }
     $ret['downloadAll'] = $this->getData()->getChildComponent('-downloadAll');
     if (($this->_getGalleryColumns() <= $showPics || $ret['imagesPerLine'] >= $showPics) && count($ret['children']) <= $showPics) {
         $ret['showPics'] = null;
     } else {
         $ret['showPics'] = $showPics;
     }
     return $ret;
 }