protected function _getChildContentWidth(Kwf_Component_Data $child) { $ownWidth = parent::_getChildContentWidth($child); $w = $this->_getWidth($child, $ownWidth); if (is_int($w)) { return $w; //fix with } $sumUsedWith = 0; $columns = 0; $noWidthColumns = 0; foreach ($this->getData()->getChildComponents($this->_getSelect()) as $c) { $columns++; $w = $this->_getWidth($c, $ownWidth); if ($w) { $sumUsedWith += $w; } else { $noWidthColumns++; } } $ownWidth -= $this->_getSetting('contentMargin') * ($columns - 1) + $sumUsedWith; if ($noWidthColumns == 0) { $noWidthColumns = 1; } return round($ownWidth / $noWidthColumns); }
public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('Related Products'); $ret['generators']['child']['component'] = 'Kwc_Shop_Products_Detail_RelatedProducts_Product_Component'; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['componentName'] = trlKwfStatic('Questions and answers'); $ret['generators']['child']['component'] = 'Kwc_Articles_Detail_QuestionsAnswers_SwitchDisplay_Component'; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $row = $ret['row']; $columnTypes = $this->_getSetting('columns'); $type = $row->type; if (!$type) { //default is first $type = array_keys($columnTypes); $type = array_shift($type); } $columns = $columnTypes[$type]; $i = 1; $ret['rootElementClass'] .= " col{$type}"; foreach ($ret['listItems'] as $key => $value) { $cls = " span{$columns['colSpans'][$i - 1]}"; if ($i == 1) { $cls .= " " . $this->_getBemClass("listItem--lineFirst", "lineFirst"); } if ($i == count($columns['colSpans'])) { $cls .= " " . $this->_getBemClass("listItem--lineLast", "lineLast"); } $ret['listItems'][$key]['class'] .= $cls; $i == count($columns['colSpans']) ? $i = 1 : $i++; if (!$ret['listItems'][$key]['data']->hasContent()) { $ret['listItems'][$key]['class'] .= ' emptyContent'; } } return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component'] = 'Kwc_Trl_List_List_Child_Component'; $ret['childModel'] = 'Kwc_Trl_List_List_TestModel'; $ret['ownModel'] = 'Kwc_Trl_List_List_TestOwnModel'; return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); foreach ($ret['listItems'] as $k => $v) { $ret['listItems'][$k]['title'] = $v['data']->row->title; } return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); foreach ($ret['listItems'] as $k => $v) { $ret['listItems'][$k]['title'] = $v['data']->row->title; } return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); foreach ($ret['listItems'] as $k => $v) { $ret['listItems'][$k]['width'] = $this->getChildContentWidth($v['data']) . 'px'; } return $ret; }
public static function getSettings($param = null) { $settings = parent::getSettings($param); $settings['generators']['child']['component'] = 'Kwc_Basic_Download_Component'; $settings['componentIcon'] = 'disk'; $settings['componentName'] = trlKwfStatic('Downloads'); $settings['componentCategory'] = 'content'; return $settings; }
protected function _getChildContentWidth(Kwf_Component_Data $child) { $ownWidth = parent::_getChildContentWidth($child); $widthCalc = $child->row->col_span / $child->row->columns; $ret = floor($ownWidth * $widthCalc); if ($ret < 480) { $ret = min($ownWidth, 480); } return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); if (count($ret['listItems']) == 2 || count($ret['listItems']) == 3) { // Necessary as carousel slider needs at least 4 items to work $ret['listItems'] = array_merge($ret['listItems'], $ret['listItems']); } $ret['config'] = array('contentWidth' => $this->getContentWidth()); return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('Images'); $ret['componentIcon'] = 'pictures'; $ret['generators']['child']['component'] = 'Kwc_Basic_Image_Component'; $ret['cssClass'] = 'kwfup-webStandard'; $ret['pdfColumns'] = 1; $ret['contentMargin'] = 10; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component'] = 'Kwc_Basic_Link_Component'; $ret['componentName'] = trlKwfStatic('Links'); $ret['componentIcon'] = 'links'; $ret['componentCategory'] = 'content'; $ret['componentPriority'] = 30; $ret['rootElementClass'] = 'kwfUp-webStandard'; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['componentName'] = trlKwfStatic('Team'); $ret['componentIcon'] = 'image'; $ret['generators']['child']['component'] = 'Kwc_Advanced_Team_Member_Component'; $ret['generators']['child']['class'] = 'Kwc_Advanced_Team_MemberGenerator'; $ret['extConfig'] = 'Kwc_Abstract_List_ExtConfigList'; // möglich zu überschreiben für vcards // $ret['defaultVcardValues'] = array(); return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['selector'] = $this->_getSetting('selector'); $ret['textSelector'] = $this->_getSetting('textSelector'); $ret['fadeConfig'] = $this->_getSetting('fadeConfig'); $ret['fadeClass'] = $this->_getSetting('fadeClass'); if (isset($ret['fadeConfig']['template']) && $ret['fadeConfig']['template']) { $ret['fadeConfig']['template'] = $this->getData()->trlStaticExecute($ret['fadeConfig']['template']); } return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['previewCssClass'] = $this->_getSetting('previewCssClass'); $ret['options']['transition'] = $this->_getSetting('transition'); $ret['options']['showArrows'] = $this->_getSetting('showArrows'); $ret['options']['showPlayPause'] = $this->_getSetting('showPlayPause'); $ret['options']['autoPlay'] = $this->_getSetting('autoPlay'); $ret['options']['useHistoryState'] = $this->_getSetting('useHistoryState'); $ret['options']['class'] = $this->_getSetting('eyeCandyListClass'); foreach ($ret['listItems'] as &$item) { $item['largePage'] = $this->getData()->getChildComponent('_' . $item['data']->id); } return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['config'] = array('slickConfig' => $this->_getSetting('slickConfig'), 'countItems' => count($ret['listItems']), 'contentWidth' => $this->getContentWidth()); return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['limit'] = 1; return $ret; }