當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。