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


PHP XoopsPersistableObjectHandler::getAll方法代码示例

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


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

示例1: getRelated

 public function getRelated($start = 0, $limit = 0, $sort = 'related_name', $order = 'ASC')
 {
     $criteria = new CriteriaCompo();
     $criteria->setSort($sort);
     $criteria->setOrder($order);
     $criteria->setStart($start);
     $criteria->setLimit($limit);
     return parent::getAll($criteria, null, false);
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:9,代码来源:page_related.php

示例2: getCatIds

 function getCatIds($uids = null)
 {
     if ($uids == null) {
         return false;
     }
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria("uid", "(" . implode(", ", $uids) . ")", "in"), 'AND');
     $cats = parent::getAll($criteria, null, false);
     return $cats;
 }
开发者ID:yunsite,项目名称:xoopsdc,代码行数:10,代码来源:linkusers.php

示例3: getAllByFieldId

 /**
  * get all rows matching a condition
  *
  * @param  CriteriaElement $criteria  {@link CriteriaElement} to match
  *
  * @return array of row arrays, indexed by field_id
  */
 public function getAllByFieldId(CriteriaElement $criteria = null)
 {
     $rawRows = parent::getAll($criteria, null, false, false);
     usort($rawRows, array($this, 'visibilitySort'));
     $rows = array();
     foreach ($rawRows as $rawRow) {
         $rows[$rawRow['field_id']][] = $rawRow;
     }
     return $rows;
 }
开发者ID:geekwright,项目名称:XoopsCore25,代码行数:17,代码来源:visibility.php

示例4: getStats

 public function getStats($content_id)
 {
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('rating_content_id', $content_id));
     $i = 0;
     $total = 0;
     $obj = parent::getAll($criteria);
     foreach ($obj as $k => $v) {
         ++$i;
         $total += $v->getVar('rating_rating');
     }
     return array('voters' => $i, 'average' => $total / $i);
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:13,代码来源:page_rating.php

示例5: getPageTitle

 public function getPageTitle($status = null, $sort = 'content_weight ASC, content_title', $order = 'ASC')
 {
     $criteria = new CriteriaCompo();
     if (isset($status)) {
         $criteria->add(new Criteria('content_status', $status));
     }
     $criteria->setSort($sort);
     $criteria->setOrder($order);
     return parent::getAll($criteria, array('content_id', 'content_title'), false);
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:10,代码来源:page_content.php

示例6: menu_related

 public function menu_related($content_id)
 {
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('link_content_id', $content_id));
     $related = parent::getAll($criteria, null, true, false);
     if (count($related) > 0) {
         $related_Handler = Page::getInstance()->getRelatedHandler();
         $related_arr = $related_Handler->get($related[0]->getVar('link_related_id'));
         $ret = $related_arr->getValues();
         // create button prev / next
         $keys = array_keys($ret['related_links']);
         foreach ($keys as $k => $i) {
             if ($content_id == $ret['related_links'][$i]['content_id']) {
                 if ($k - 1 >= 0) {
                     $ret['prev_id'] = $ret['related_links'][$keys[$k - 1]]['content_id'];
                     $ret['prev_title'] = $ret['related_links'][$keys[$k - 1]]['content_title'];
                 }
                 if ($k + 1 < count($keys)) {
                     $ret['next_id'] = $ret['related_links'][$keys[$k + 1]]['content_id'];
                     $ret['next_title'] = $ret['related_links'][$keys[$k + 1]]['content_title'];
                 }
                 break;
             }
         }
         return $ret;
     }
     return array();
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:28,代码来源:page_related_link.php

示例7: getBySpotlight

 function getBySpotlight($spotlight_id, $limit = 5, $sort = 'page_order', $order = 'ASC')
 {
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('sp_id', $spotlight_id));
     $criteria->setLimit($limit);
     $criteria->setSort($sort);
     $criteria->setOrder($order);
     $pages = parent::getAll($criteria, array('page_id', 'page_title', 'page_link', 'page_image', 'page_desc'), false);
     return $pages;
 }
开发者ID:yunsite,项目名称:xoopsdc,代码行数:10,代码来源:page.php


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