• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Kwc_Abstract_Composite_Component类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _getChildContentWidth

 protected function _getChildContentWidth(Kwf_Component_Data $child)
 {
     if ($child->id == 'large') {
         return Kwc_Abstract_Composite_Component::getContentWidth();
     }
     return parent::_getChildContentWidth($child);
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例2: getTemplateVars

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


示例3: getSettings

 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;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例4: getTemplateVars

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例5: hasContent

 public function hasContent()
 {
     if (!$this->_getRow()->text) {
         return false;
     }
     return parent::hasContent();
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例6: getSettings

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例7: getTemplateVars

 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;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:25,代码来源:Component.php


示例8: getSettings

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例9: _getChildContentWidth

 protected function _getChildContentWidth(Kwf_Component_Data $child)
 {
     $ret = parent::_getChildContentWidth($child);
     $ret -= $this->_getSetting('contentMargin') * 1;
     $ret = $ret / 2;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例10: getSettings

 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;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例11: getTemplateVars

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:33,代码来源:Component.php


示例12: getTemplateVars

 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;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Component.php


示例13: getSettings

 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['plugins']['password'] = 'Kwf_Component_Plugin_Password_Component';
     $ret['generators']['child']['component']['downloadTag'] = 'Kwc_Basic_DownloadTagBehindLogin_TestComponent';
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Download.php


示例14: getTemplateVars

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例15: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['backgroundColor'] = $this->getRow()->background_color;
     $ret['marginBottom'] = $this->getRow()->margin_bottom;
     return $ret;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例16: getSettings

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例17: getSettings

 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;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例18: getTemplateVars

 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;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:33,代码来源:Component.php


示例19: getSettings

 public static function getSettings()
 {
     $ret = parent::getSettings();
     $ret['generators']['child']['component'] = array('child' => 'Kwf_Component_Output_C1_ChildChild_Component');
     $ret['contentWidth'] = 600;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例20: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['name'] = $this->getRow()->anchor ? $this->getRow()->anchor : null;
     $ret['anchorId'] = $this->getData()->componentId;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Kwc_Abstract_Form类代码示例发布时间:2022-05-23
下一篇:
PHP Kwc_Abstract类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap