当前位置: 首页>>代码示例>>PHP>>正文


PHP Kwc_Abstract::getTemplateVars方法代码示例

本文整理汇总了PHP中Kwc_Abstract::getTemplateVars方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Abstract::getTemplateVars方法的具体用法?PHP Kwc_Abstract::getTemplateVars怎么用?PHP Kwc_Abstract::getTemplateVars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kwc_Abstract的用法示例。


在下文中一共展示了Kwc_Abstract::getTemplateVars方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $page = $this->getData()->getPage();
     $ret['childPages'] = $page->getChildPages();
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例2: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $children = $this->getData()->getChildComponents($this->getSelect());
     // children ist die alte methode, bleibt drin wegen kompatibilität
     $ret['children'] = $children;
     // das hier ist die neue variante und ist besser, weil man leichter mehr daten
     // zurückgeben kann, bzw. in der übersetzung überschreiben kann
     // zB: Breite bei übersetzung von Columns
     $ret['listItems'] = array();
     $i = 0;
     foreach ($children as $child) {
         $class = $this->_getBemClass('listItem', 'listItem') . ' ';
         if ($i == 0) {
             $class .= ' ' . $this->_getBemClass('listItem--first', 'kwcFirst');
         }
         if ($i == count($children) - 1) {
             $class .= ' ' . $this->_getBemClass('listItem--last', 'kwcLast');
         }
         if ($i % 2 == 0) {
             $class .= ' ' . $this->_getBemClass('listItem--even', 'kwcEven');
         } else {
             $class .= ' ' . $this->_getBemClass('listItem--odd', 'kwcOdd');
         }
         $class = trim($class);
         $i++;
         $ret['listItems'][] = array('data' => $this->getItemComponent($child), 'class' => $class, 'style' => '');
     }
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:30,代码来源:Component.php

示例3: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['imageUrl'] = $this->getImageUrl();
     $ret['imagePage'] = $this->getData()->getChildComponent('_imagePage', array('ignoreVisible' => true));
     return $ret;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例4: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['headline1'] = $this->_getRow()->headline1;
     $ret['headline2'] = $this->_getRow()->headline2;
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例5: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['imgCssClass'] = $this->_getSetting('imgCssClass');
     $ret['style'] = '';
     $ret['containerClass'] = $this->_getBemClass("container");
     $ret['image'] = $this->getData();
     $imageComponent = $this->_getImageComponent();
     if ($imageComponent) {
         $ret['altText'] = $imageComponent->getAltText();
         $imageData = $this->getImageData();
         $ret = array_merge($ret, Kwf_Media_Output_Component::getResponsiveImageVars($this->getImageDimensions(), $imageData['file']));
         $ret['style'] .= 'max-width:' . $ret['width'] . 'px;';
         if ($this->_getSetting('defineWidth')) {
             $ret['style'] .= 'width:' . $ret['width'] . 'px;';
         }
         if ($ret['width'] > 100) {
             $ret['containerClass'] .= ' kwfUp-webResponsiveImgLoading';
         }
     }
     $ret['baseUrl'] = $this->_getBaseImageUrl();
     $ret['defineWidth'] = $this->_getSetting('defineWidth');
     $ret['lazyLoadOutOfViewport'] = $this->_getSetting('lazyLoadOutOfViewport');
     $ret['outputImgTag'] = $this->_getSetting('outputImgTag');
     if (!$this->_getSetting('lazyLoadOutOfViewport')) {
         $ret['containerClass'] .= ' kwfUp-loadImmediately';
     }
     if (!$renderer instanceof Kwf_Component_Renderer_Mail) {
         //TODO this check is a hack
         $ret['template'] = Kwf_Component_Renderer_Twig_TemplateLocator::getComponentTemplate('Kwc_Abstract_Image_Component');
     }
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:33,代码来源:Component.php

示例6: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['language'] = $this->getData()->getLanguage();
     $ret['assetsPackage'] = Kwf_Assets_Package_Default::getInstance('Frontend');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例7: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $page = $this->getData()->getPage();
     $ret['childPages'] = $page->getChildPages();
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例8: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['wirecardButton'] = $this->_getWirecardButton();
     $ret['options'] = array('controllerUrl' => Kwc_Admin::getInstance(get_class($this))->getControllerUrl() . '/json-confirm-order', 'params' => array('paymentComponentId' => $this->getData()->parent->componentId));
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例9: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $row = $this->getData()->parent->getComponent()->getFormRow();
     $ret['payment'] = $this->getData()->parent->parent->getComponent()->getPayment($row);
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例10: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['requestUri'] = $_SERVER['REQUEST_URI'];
     // TODO
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例11: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $row = $this->getData()->parent->getComponent()->getFormRow();
     $ret['payment'] = $this->getData()->parent->parent->getComponent()->getPayment($row);
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例12: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['componentClass'] = get_class($this);
     $ret['test2'] = $this->getData()->getChildComponent('_test2');
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例13: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['paypalButton'] = $this->_getPaypalButton();
     $ret['options'] = array('controllerUrl' => Kwc_Admin::getInstance($this->getData()->componentClass)->getControllerUrl() . '/json-confirm-order', 'params' => array('paymentComponentId' => $this->getData()->parent->componentId));
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例14: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['componentClass'] = get_class($this);
     $ret['test2'] = $this->getData()->getChildComponent('_test2');
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php

示例15: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $c = $this->getData()->parent->getComponent();
     $size = $c->getImageDimensions();
     $ret['width'] = $size['width'];
     $ret['height'] = $size['height'];
     $ret['imageUrl'] = $c->getImageUrl();
     $ret['options'] = (object) $c->getOptions();
     // Next-Previous Links
     $imageEnlarge = $this->getData()->parent->parent;
     if (is_instance_of($imageEnlarge->componentClass, 'Kwc_Basic_ImageEnlarge_Component') || is_instance_of($imageEnlarge->componentClass, 'Kwc_Basic_ImageEnlargeParent_Component')) {
         // Only show links when it's an ImageEnlarge (no LinkTag)
         $parent = $imageEnlarge->parent;
         $getChildren = array();
         if (is_instance_of($parent->componentClass, 'Kwc_Abstract_List_Component')) {
             //it's in an List_Gallery
         } else {
             if ($parent->parent && is_instance_of($parent->parent->componentClass, 'Kwc_Abstract_List_Component')) {
                 //it's in an List_Switch with ImageEnlarge as large component (we have to go up one more level)
                 $getChildren = array('-' . $imageEnlarge->id);
                 $imageEnlarge = $imageEnlarge->parent;
             }
         }
         $links = self::getPreviousAndNextImagePage($this->getData()->componentClass, $imageEnlarge, $getChildren);
         $ret = array_merge($ret, $links);
     } else {
         $ret['next'] = null;
         $ret['previous'] = null;
     }
     $imageData = $c->getImageData();
     $ret = array_merge($ret, Kwf_Media_Output_Component::getResponsiveImageVars($size, $imageData['file']));
     $ret['baseUrl'] = $c->getBaseImageUrl();
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:35,代码来源:Component.php


注:本文中的Kwc_Abstract::getTemplateVars方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。