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

PHP Kwc_Chained_Trl_Component类代码示例

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

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



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

示例1: _getContentChild

 private function _getContentChild()
 {
     $model = $this->getOwnModel();
     $masterChild = $this->getData()->chained->getComponent()->getContentChild();
     $c = Kwc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
     $page = $this->getData();
     while ($c && (!$c->hasContent() || $this->_getSetting('hasVisible') && $c->parent->getComponent()->getRow() && !$c->parent->getComponent()->getRow()->visible)) {
         while ($page && !$page->inherits) {
             $page = $page->parent;
             if ($page instanceof Kwf_Component_Data_Root) {
                 break;
             }
         }
         if (!isset($page->chained)) {
             $c = null;
             break;
         }
         $masterChild = $page->chained->getChildComponent('-' . $this->getData()->id)->getChildComponent(array('generator' => 'child'));
         $c = Kwc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
         if ($page instanceof Kwf_Component_Data_Root) {
             break;
         }
         $page = $page->parent;
     }
     return $c;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:26,代码来源:Component.php


示例2: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $menu = array();
     $masterMenu = $this->getData()->chained->getComponent()->getMenuData(null, array('ignoreVisible' => true));
     foreach ($masterMenu as $m) {
         $component = Kwc_Chained_Trl_Component::getChainedByMaster($m['data'], $this->getData());
         if ($component) {
             $m['submenu'] = array();
             $masterSubMenu = $this->getData()->chained->getComponent()->getMenuData($m['data'], array('ignoreVisible' => true), 'Kwc_Menu_Expanded_EditableItems_Component');
             foreach ($masterSubMenu as $sm) {
                 $sComponent = Kwc_Chained_Trl_Component::getChainedByMaster($sm['data'], $this->getData());
                 if ($sComponent) {
                     $sm['data'] = $sComponent;
                     $sm['text'] = $sComponent->name;
                     $m['submenu'][] = $sm;
                 }
             }
             $this->_attachEditableToMenuData($m['submenu']);
             $m['data'] = $component;
             $m['text'] = $component->name;
             $menu[] = $m;
         }
     }
     $ret['menu'] = $menu;
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Component.php


示例3: getLinkedData

 public final function getLinkedData()
 {
     if (!isset($this->_data)) {
         $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible' => true));
         if (!$masterLinkData) {
             $this->_data = false;
         }
         if ($masterLinkData) {
             if (is_null($this->_type)) {
                 throw new Kwf_Exception("_type may not be null");
             }
             if ($this->_type == 'Trl') {
                 $linkComponent = Kwc_Chained_Trl_Component::getChainedByMaster($masterLinkData, $this);
             } else {
                 if ($this->_type == 'Cc') {
                     $linkComponent = Kwc_Chained_Cc_Component::getChainedByMaster($masterLinkData, $this);
                 }
             }
             if (!$linkComponent) {
                 $this->_data = false;
                 //kann offline sein
             } else {
                 $this->_data = $linkComponent;
             }
         }
     }
     return $this->_data;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:28,代码来源:DataAbstract.php


示例4: getLinkedData

 public final function getLinkedData()
 {
     if (!isset($this->_data)) {
         $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible' => true));
         if (!$masterLinkData) {
             $this->_data = false;
         }
         if ($masterLinkData) {
             if (is_null($this->_type)) {
                 throw new Kwf_Exception("_type may not be null");
             }
             if ($this->_type == 'Trl') {
                 $linkComponent = Kwc_Chained_Trl_Component::getChainedByMaster($masterLinkData, $this);
             } else {
                 if ($this->_type == 'Cc') {
                     $linkComponent = Kwc_Chained_Cc_Component::getChainedByMaster($masterLinkData, $this);
                 }
             }
             if (!$linkComponent) {
                 $this->_data = false;
                 //kann offline sein
             } else {
                 $this->_data = $linkComponent;
             }
         }
     }
     $m = Kwc_Abstract::createModel($this->chained->componentClass);
     $result = $m->fetchColumnsByPrimaryId(array('anchor'), $this->chained->dbId);
     if ($result['anchor']) {
         $this->_anchor = $result['anchor'];
     }
     return $this->_data;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:33,代码来源:DataAbstract.php


示例5: attachEditableToMenuData

 public function attachEditableToMenuData(&$menuData)
 {
     foreach ($menuData as $k => &$m) {
         if (isset($m['editable']) && $m['editable']) {
             $m['editable'] = Kwc_Chained_Trl_Component::getChainedByMaster($m['editable'], $this->getData());
         }
     }
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Component.php


示例6: onMasterMediaCacheChanged

 public function onMasterMediaCacheChanged(Kwf_Events_Event_Media_Changed $e)
 {
     foreach (Kwc_Chained_Trl_Component::getAllChainedByMaster($e->component, 'Trl') as $chained) {
         if (!$chained->getComponent()->getRow()->own_download) {
             $this->fireEvent(new Kwf_Events_Event_Media_Changed($this->_class, $chained));
         }
     }
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Events.php


示例7: getTemplateVars

 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['link1'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link1'], $this->getData());
     $ret['link4'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link4'], $this->getData());
     $ret['link5'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link5'], $this->getData());
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Component.php


示例8: getTemplateVars

 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['link1'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link1'], $this->getData());
     $ret['link4'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link4'], $this->getData());
     $ret['link5'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link5'], $this->getData());
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Component.php


示例9: duplicated

 public static function duplicated(Kwf_Component_Data $source, Kwf_Component_Data $new)
 {
     $chained = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Root_TrlRoot_Chained_Component', array('ignoreVisible' => true));
     //bySameClass wenn fkt nicht mehr static (todo oben erledigt)
     $sourceChained = array();
     foreach ($chained as $c) {
         $subRootAboveTrl = $c;
         //eg. domain
         while ($subRootAboveTrl = $subRootAboveTrl->parent) {
             if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                 break;
             }
         }
         if (!$subRootAboveTrl) {
             $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
         }
         $d = $source;
         while ($d = $d->parent) {
             if ($d->componentId == $subRootAboveTrl->componentId) {
                 $sourceChained[$c->getLanguage()] = $c;
             }
         }
     }
     $targetChained = array();
     foreach ($chained as $c) {
         $subRootAboveTrl = $c;
         //eg. domain
         while ($subRootAboveTrl = $subRootAboveTrl->parent) {
             if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
                 break;
             }
         }
         if (!$subRootAboveTrl) {
             $subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
         }
         $d = $new;
         while ($d = $d->parent) {
             if ($d->componentId == $subRootAboveTrl->componentId) {
                 if (isset($sourceChained[$c->getLanguage()])) {
                     //only if there is a source language
                     $targetChained[] = array('targetChained' => $c, 'sourceChained' => $sourceChained[$c->getLanguage()]);
                 }
             }
         }
     }
     foreach ($targetChained as $c) {
         $sourceChained = Kwc_Chained_Trl_Component::getChainedByMaster($source, $c['sourceChained'], array('ignoreVisible' => true));
         $newChained = Kwc_Chained_Trl_Component::getChainedByMaster($new, $c['targetChained'], array('ignoreVisible' => true));
         if (!$sourceChained || $source->componentId == $sourceChained->componentId) {
             continue;
             //wenn sourceChained nicht gefunden handelt es sich zB um ein MasterAsChild - was ignoriert werden muss
         }
         if (!$newChained) {
             throw new Kwf_Exception("can't find chained components");
         }
         Kwc_Admin::getInstance($newChained->componentClass)->duplicate($sourceChained, $newChained);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:58,代码来源:Admin.php


示例10: _createData

 protected function _createData($parentData, $row, $select)
 {
     $ret = parent::_createData($parentData, $row, $select);
     $ret->targetPage = Kwc_Chained_Trl_Component::getChainedByMaster($row->targetPage, $parentData, array('ignoreVisible' => $select->getPart(Kwf_Component_Select::IGNORE_VISIBLE)));
     if (!$ret->targetPage) {
         return null;
     }
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Generator.php


示例11: 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


示例12: getTemplateVars

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


示例13: getSettings

 public static function getSettings($masterComponentClass = null)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['ownModel'] = 'Kwf_Component_FieldModel';
     $ret['generators']['mail'] = array('class' => 'Kwf_Component_Generator_Static', 'component' => 'Kwc_Mail_Trl_Mail_Component.' . $masterComponentClass);
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例14: getTemplateVars

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


示例15: getTemplateVars

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


示例16: getTemplateVars

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


示例17: getSettings

 public static function getSettings($masterComponent)
 {
     $ret = parent::getSettings($masterComponent);
     $ret['ownModel'] = new Kwf_Model_FnF(array('primaryKey' => 'component_id'));
     $ret['componentName'] = 'Test Trl';
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例18: 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


示例19: getSettings

 public static function getSettings($masterComponentClass)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['generators']['page']['class'] = 'Kwc_Root_Category_Trl_Generator';
     $ret['generators']['page']['model'] = 'Kwc_Root_Category_Trl_GeneratorModel';
     return $ret;
 }
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Component.php


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Kwc_TestAbstract类代码示例发布时间:2022-05-23
下一篇:
PHP Kwc_Admin类代码示例发布时间: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