public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['metaTags'] = $this->_getMetaTags(); $ret['canonicalUrl'] = $this->getData()->getAbsoluteUrl(); return $ret; }
public static function getSettings() { $ret = array_merge(parent::getSettings(), array('componentName' => trlKwfStatic('Link Image'), 'componentIcon' => 'image')); $ret['generators']['child']['component']['image'] = 'Kwc_Basic_Image_Component'; $ret['generators']['child']['component']['link'] = 'Kwc_Basic_LinkTag_Component'; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['leftWidth'] = $this->_getChildContentWidth($this->getData()->getChildComponent('-leftColumn')); $ret['rightWidth'] = $this->_getChildContentWidth($this->getData()->getChildComponent('-rightColumn')); return $ret; }
public function hasContent() { if (!$this->_getRow()->text) { return false; } return parent::hasContent(); }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['list1'] = 'Kwc_Directories_AjaxViewTwoOnOnePage_List1_Component'; $ret['generators']['child']['component']['list2'] = 'Kwc_Directories_AjaxViewTwoOnOnePage_List2_Component'; return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['sources'] = null; //mp3 $url = Kwf_Media::getUrl($this->getData()->componentClass, $this->getData()->componentId, 'mp3', 'audio.mp3'); if ($url) { $ret['source'] = array('src' => $url, 'type' => 'audio/mp3', 'title' => 'mp3'); } $ret['config'] = Kwc_Abstract::getSetting($this->getData()->componentClass, 'audio'); $row = $this->getRow(); if ($row->audio_width) { $ret['config']['audioWidth'] = $row->audio_width; } if ($row->audio_height) { $ret['config']['audioHeight'] = $row->audio_height; } if ($row->auto_play) { $ret['config']['autoPlay'] = true; } if ($row->loop) { $ret['config']['loop'] = true; } return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['paging'] = 'Kwf_Component_Output_Partial_Paging_Paging'; $ret['contentWidth'] = 600; return $ret; }
protected function _getChildContentWidth(Kwf_Component_Data $child) { $ret = parent::_getChildContentWidth($child); $ret -= $this->_getSetting('contentMargin') * 1; $ret = $ret / 2; return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['child'] = array('class' => 'Kwf_Component_Generator_Static', 'component' => 'Kwf_Component_ContentWidth_Page_Child_Component'); $ret['contentWidthSubtract'] = 10; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['product'] = $this->getData()->row; $ret['item'] = $ret['product']->getItem(); $ret['similarProducts'] = array(); if ($ret['item']->SimilarProducts) { foreach ($ret['item']->SimilarProducts as $p) { $p = $ret['product']->getModel()->getRow($p->ASIN); foreach ($p->getChildRows('ProductsToNodes') as $n) { $s = new Kwf_Component_Select(); $s->whereEquals('node_id', $n->node_id); $s->whereGenerator('detail'); if ($this->getData()->parent->parent->countChildComponents($s)) { $ret['similarProducts'][] = $this->getData()->parent->getChildComponent('_' . $p->asin); break; } } } } $ret['nodes'] = array(); $nodes = $ret['product']->getChildRows('ProductsToNodes'); foreach ($nodes as $node) { $s = new Kwf_Component_Select(); $s->whereEquals('node_id', $node->node_id); $s->whereGenerator('detail'); $node = $this->getData()->parent->parent->getChildComponent($s); if ($node) { $ret['nodes'][] = $node; } } return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $row = $this->getRow(); $ret['row'] = $row; if (!$row->image) { $ret['image'] = false; } else { $ret['rootElementClass'] .= ' ' . $this->_getBemClass('--imageDimension' . ucfirst($ret['image']->getComponent()->getDimensionSetting())); $dim = $ret['image']->getComponent()->getImageDimensions(); $ret['imageWidth'] = false; if ($dim && isset($dim['width'])) { $ret['imageWidth'] = $dim['width']; } $ret['position'] = $row->position; $ret['rootElementClass'] .= ' ' . $this->_getBemClass('--position' . ucfirst($row->position)); $ret['rootElementClass'] .= ' ' . $this->_getBemClass('--' . ($row->flow ? 'flow' : 'noFlow')); if ($ret['imageWidth'] <= 100) { $ret['rootElementClass'] .= ' ' . $this->_getBemClass('--smallImage'); } $ret['mailImageVAlign'] = $this->_getSetting('mailImageVAlign'); } if (!$ret['text']->hasContent()) { $ret['rootElementClass'] .= ' ' . $this->_getBemClass('--noText'); } return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['plugins']['password'] = '******'; $ret['generators']['child']['component']['downloadTag'] = 'Kwc_Basic_DownloadTagBehindLogin_TestComponent'; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['name'] = $this->getRow()->anchor ? $this->getRow()->anchor : null; $ret['anchorId'] = $this->getData()->componentId; return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['backgroundColor'] = $this->getRow()->background_color; $ret['marginBottom'] = $this->getRow()->margin_bottom; return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['backgroundColor'] = $this->_getBemClass('--' . $this->getRow()->background_color); $ret['marginBottom'] = $this->getRow()->margin_bottom; return $ret; }
public function getTemplateVars() { $return = parent::getTemplateVars(); $fileRow = $this->_getFileRow(); $parentRow = $fileRow->getParentRow('File'); if ($this->_getSetting('showFilesize') && $parentRow) { $return['filesize'] = $parentRow->getFileSize(); } else { $return['filesize'] = null; } $return['infotext'] = $this->_getRow()->infotext; if ($return['infotext'] == '' && $parentRow) { $return['infotext'] = $parentRow->filename; } if ($this->_getSetting('showIcon')) { $return['icon'] = $this->getIcon(); } else { $return['icon'] = null; } if ($parentRow) { $return['extension'] = $parentRow->extension; } else { $return['extension'] = null; } return $return; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component'] = array('child' => 'Kwf_Component_Output_C2_Child_Component', 'childNoCache' => 'Kwf_Component_Output_C2_ChildNoCache_Component'); $ret['contentWidth'] = 600; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['video'] = 'Kwc_Basic_LinkTag_CommunityVideo_Lightbox_Video_Component'; $ret['contentSender'] = 'Kwc_Basic_LinkTag_CommunityVideo_Lightbox_ContentSender'; return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $row = $this->getRow(); $ret['row'] = $row; if (!$row->image) { $ret['image'] = false; } else { $ret['cssClass'] .= ' imageDimension' . ucfirst($ret['image']->getComponent()->getDimensionSetting()); $dim = $ret['image']->getComponent()->getImageDimensions(); $ret['imageWidth'] = false; if ($dim && isset($dim['width'])) { $ret['imageWidth'] = $dim['width']; } $ret['contentWidth'] = $this->getContentWidth(); $pos = $row->position; if ($pos == 'center') { $ret['center'] = ($ret['contentWidth'] - $ret['imageWidth']) / 2; } $ret['position'] = $pos; $ret['propCssClass'] = 'position' . ucfirst($pos); if ($row->flow) { $ret['propCssClass'] .= ' flow'; } else { $ret['propCssClass'] .= ' noFlow'; } $ret['mailImageVAlign'] = $this->_getSetting('mailImageVAlign'); } if (!$ret['text']->hasContent()) { $ret['cssClass'] .= ' noText'; } return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['child']['component'] = array('child' => 'Kwf_Component_Output_C1_ChildChild_Component'); $ret['contentWidth'] = 600; return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['name'] = $this->getRow()->anchor ? $this->getRow()->anchor : null; $ret['anchorId'] = $this->getData()->componentId; return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['form'] = 'Kwc_User_Register_Form_Component'; $ret['forms'] = array('general'); return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['sources'] = null; //mp3 $url = Kwf_Media::getUrl($this->getData()->componentClass, $this->getData()->componentId, 'mp3', 'audio.mp3'); $ev = new Kwf_Component_Event_CreateMediaUrl($this->getData()->componentClass, $this->getData(), $url); Kwf_Events_Dispatcher::fireEvent($ev); $url = $ev->url; if ($url) { $ret['source'] = array('src' => $url, 'type' => 'audio/mp3', 'title' => 'mp3'); } $ret['config'] = Kwc_Abstract::getSetting($this->getData()->componentClass, 'audio'); $row = $this->getRow(); if ($row->audio_width) { $ret['config']['audioWidth'] = $row->audio_width; } if ($row->audio_height) { $ret['config']['audioHeight'] = $row->audio_height; } if ($row->auto_play) { $ret['config']['autoPlay'] = true; } if ($row->loop) { $ret['config']['loop'] = true; } return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['rootElementClass'] = 'kwfUp-webStandard'; $ret['flags']['hasHeaderIncludeCode'] = true; return $ret; }
protected function _getChildContentWidth(Kwf_Component_Data $child) { if ($child->id == 'large') { return Kwc_Abstract_Composite_Component::getContentWidth(); } return parent::_getChildContentWidth($child); }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $ret['settingsRow'] = $this->_getRow(); $ret['tableStyle'] = $this->_getRow()->table_style; $ret['columnCount'] = $this->getColumnCount(); if (Kwf_Config::getValue('kwc.responsive')) { $ret['rootElementClass'] .= ' responsive' . ucfirst($this->_getRow()->responsive_style); } $dataSelect = new Kwf_Model_Select(); $dataSelect->whereEquals('visible', 1); $dataSelect->order('pos', 'ASC'); $ret['dataRows'] = array(); $rows = $this->_getRow()->getChildRows('tableData', $dataSelect); foreach ($rows as $row) { $rowData = array(); $rowData['cssStyle'] = $row->css_style; $rowData['data'] = array(); for ($i = 1; $i <= $ret['columnCount']; $i++) { $rowData['data']['column' . $i] = array('value' => $row->{'column' . $i}, 'cssClass' => ''); } $ret['dataRows'][] = $rowData; } $ret['dataRows'] = Kwc_Basic_Table_Component::addDefaultCssClasses($ret['dataRows'], $this->_getSetting('rowStyles')); $ret['headerRows'] = array(); if (isset($ret['dataRows'][0]['htmlTag']) && $ret['dataRows'][0]['htmlTag'] == 'th') { $ret['headerRows'] = array(array_shift($ret['dataRows'])); } return $ret; }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $users = Kwf_Registry::get('userModel'); $showPassword = false; //is there a password auth? foreach ($users->getAuthMethods() as $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Password) { $showPassword = true; } } if ($showPassword) { //if a redirect auth doesn't allow password hide it foreach ($users->getAuthMethods() as $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Redirect) { $user = $this->getData()->getChildComponent('-form')->getComponent()->getUserRow(); if (!$auth->allowPasswordForUser($user)) { $showPassword = false; } } } } $ret['showPassword'] = $showPassword; $ret['redirects'] = array(); foreach ($users->getAuthMethods() as $authKey => $auth) { if ($auth instanceof Kwf_User_Auth_Interface_Redirect && $auth->showInFrontend()) { $label = $auth->getLoginRedirectLabel(); $ret['redirects'][] = array('url' => $this->getData()->url, 'code' => $_GET['code'], 'authMethod' => $authKey, 'name' => $this->getData()->trlStaticExecute($label['name']), 'icon' => isset($label['icon']) ? '/assets/' . $label['icon'] : false, 'formOptions' => Kwf_User_Auth_Helper::getRedirectFormOptionsHtml($auth->getLoginRedirectFormOptions())); } } return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['generators']['child']['component'] = array('child' => 'Kwf_Component_Output_C1_ChildChild_Component'); $ret['plugins'] = array('Kwf_Component_Output_Plugin_Plugin', 'Kwf_Component_Output_Plugin_Plugin'); return $ret; }
public static function getSettings($param = null) { $ret = parent::getSettings($param); $ret['generators']['child']['component']['child'] = 'Kwf_Component_OutputPlaceholdersPlugin_Root_Child_Component'; $ret['plugins']['placeholders'] = 'Kwf_Component_Plugin_Placeholders'; $ret['contentWidth'] = 600; return $ret; }
public static function getSettings() { $ret = parent::getSettings(); $ret['rootElementClass'] = 'kwfUp-webStandard'; $ret['generators']['child']['component']['form'] = 'Kwc_Newsletter_Unsubscribe_Form_Component'; $ret['placeholder']['headline'] = trlKwfStatic('Unsubscribe newsletter'); return $ret; }