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


PHP Kwc_Abstract::getComponentClassByParentClass方法代码示例

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


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

示例1: _getRssEntries

 protected function _getRssEntries()
 {
     $select = $this->_getSelect();
     if (!$select) {
         return array();
     }
     $select->limit(10);
     if (!$select->hasPart('group')) {
         $select->group('id');
     }
     $itemDirectory = $this->getData()->parent->getComponent()->getItemDirectory();
     if (is_string($itemDirectory)) {
         $c = Kwc_Abstract::getComponentClassByParentClass($itemDirectory);
         $generator = Kwf_Component_Generator_Abstract::getInstance($c, 'detail');
         $items = $generator->getChildData(null, $select);
         //TODO: callModifyItemData aufrufen
     } else {
         $items = $itemDirectory->getChildComponents($select);
         foreach ($items as $item) {
             $itemDirectory->getComponent()->callModifyItemData($item);
         }
     }
     $ret = array();
     foreach ($items as $item) {
         $ret[] = $this->_getRssEntryByItem($item);
     }
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:28,代码来源:Component.php

示例2: getSelect

 public function getSelect()
 {
     $itemDirectory = $this->getItemDirectory();
     if (!$itemDirectory) {
         return null;
     }
     if (is_string($itemDirectory)) {
         if ($this->_getSetting('useDirectorySelect')) {
             throw new Kwf_Exception("If itemDirectory is a ComponentClass you can't use 'useDirectorySelect' setting");
         }
         $c = Kwc_Abstract::getComponentClassByParentClass($itemDirectory);
         $ret = Kwf_Component_Generator_Abstract::getInstance($c, 'detail')->select(null);
     } else {
         if ($this->_getSetting('useDirectorySelect')) {
             $ret = $itemDirectory->getComponent()->getSelect();
         } else {
             $ret = $itemDirectory->getGenerator('detail')->select($this->getItemDirectory());
         }
     }
     if (Kwc_Abstract::hasSetting($this->getData()->componentClass, 'order')) {
         throw new Kwf_Exception("Setting 'order' (" . get_class($this) . ") doesn't exist anymore - overwrite getSelect for a custom order");
     }
     return $ret;
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:24,代码来源:Component.php

示例3: getPagingCount

 public function getPagingCount($select = null)
 {
     if (!$select) {
         $select = $this->_getSelect();
     }
     if (!$select) {
         return 0;
     }
     $dir = $this->getData()->parent->getComponent()->getItemDirectory();
     if (is_string($dir)) {
         $c = Kwc_Abstract::getComponentClassByParentClass($dir);
         $generator = Kwf_Component_Generator_Abstract::getInstance($c, 'detail');
         $ret = $generator->countChildData(null, $select);
     } else {
         $ret = $dir->countChildComponents($select);
     }
     if ($select->hasPart(Kwf_Model_Select::LIMIT_COUNT)) {
         $limitCount = $select->getPart(Kwf_Model_Select::LIMIT_COUNT);
         if ($ret > $limitCount) {
             $ret = $limitCount;
         }
     }
     return $ret;
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:24,代码来源:Component.php


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