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


PHP Kwc_Chained_Trl_Component类代码示例

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


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

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

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

示例11: getTemplateVars

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

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

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

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

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


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