IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Article
  • ArticleApproval
  • ArticleBack
  • ArticleCategory
  • ArticlePicture
  • ArticleReader

Class Article

CActiveRecord
Extended by application\core\model\Model
Extended by application\modules\article\model\Article
Namespace: application\modules\article\model
Copyright: Copyright © 2008-2013 IBOS Inc
Author: Ring Ring@ibos.com.cn
Located at system/modules/article/model/Article.php

Methods summary

public static
# model( $className = __CLASS__ )
public
# tableName( )
public array
# fetchAllAndPage( string $conditions = '', integer $pageSize = null )

根据条件,查询出对应数据,返回一个数组,其中数组元素中的pages为翻页所需的数据,datas为列表所需的数据

array( 'pages' => $pages, 'datas' => $datas );

根据条件,查询出对应数据,返回一个数组,其中数组元素中的pages为翻页所需的数据,datas为列表所需的数据

array( 'pages' => $pages, 'datas' => $datas );

Parameters

$conditions
查询条件 default='';
$pageSize
default=null;每页显示的数据条数

Returns

array
public array
# fetchAllFieldValueByArticleids( application\core\utils\String $field, integer $articleids )

根据articleid获取一个指定字段的所有值

根据articleid获取一个指定字段的所有值

Parameters

$field
字段名
$articleids
文章ids

Returns

array
public boolean
# cancelTop( )

取消已过期的置顶

取消已过期的置顶

Returns

boolean
public boolean
# updateTopStatus( string $ids, integer $isTop, integer $topTime, integer $topEndTime )

设置/取消置顶

设置/取消置顶

Parameters

$ids
要设置或取消的id
$isTop
状态
$topTime
置顶时间
$topEndTime
置顶结束时间

Returns

boolean
public boolean
# updateIsOverHighLight( )

取消已过期高亮

取消已过期高亮

Returns

boolean
public boolean
# updateHighlightStatus( string $ids, integer $ishighlight, string $highlightstyle, integer $highlightendtime )

设置/取消高亮

设置/取消高亮

Parameters

$ids
要设置或取消的id
$ishighlight
状态
$highlightstyle
高亮样式
$highlightendtime
高亮结束时间

Returns

boolean
public integer
# deleteAllByArticleIds( string $ids )

根据文章id,删除所有符合的数据

根据文章id,删除所有符合的数据

Parameters

$ids

Returns

integer
public integer
# updateAllStatusAndApproverByPks( string $ids, integer $approver, string $status = 1 )

根据文章ids更新所有符合条件的文章的状态和审批人

根据文章ids更新所有符合条件的文章的状态和审批人

Parameters

$ids
文章ids
$approver
审批人uid
$status
状态,默认为1公开

Returns

integer
被更新的行数
public integer
# updateAllCatidByArticleIds( string $ids, integer $catid )

根据文章ids,更新所有符合条件的分类

根据文章ids,更新所有符合条件的分类

Parameters

$ids
$catid

Returns

integer
public integer
# updateClickCount( integer $id, integer $clickCount = 0 )

更新文章点击数量

更新文章点击数量

Parameters

$id
文章id
$clickCount
点击数,默认为0

Returns

integer
public array
# getSourceInfo( integer $id )

兼容Source接口

兼容Source接口

Parameters

$id
资源ID

Returns

array
public array
# fetchUnApprovalArtIds( mixed $catid, integer $uid )

根据分类id获取某个uid的未审核文章id

根据分类id获取某个uid的未审核文章id

Parameters

$catid
分类id
$uid
用户id

Returns

array
public
# getArticleCount( string $type, integer $uid, type $catid = 0, type $condition = '' )

未读,待审核,草稿 统计数

未读,待审核,草稿 统计数

Parameters

$type
$uid
$catid
$condition

Methods inherited from application\core\model\Model

add(), beforeDelete(), create(), deleteByPk(), fetch(), fetchAll(), fetchAllByAttributes(), fetchAllByPk(), fetchAllSortByPk(), fetchByAttributes(), fetchByPk(), fetchCache(), fetchCaches(), getCacheKey(), getIsAllowCache(), getMaxId(), getModelClass(), init(), modify(), remove(), updateAll(), updateByPk()

Properties summary

Properties inherited from application\core\model\Model

$allowCache, $cacheLife

IBOS open source API documentation generated by ApiGen