PHP Class Blog

* This file is part of Raui ORE *********************************************************************************************
Inheritance: extends ParentModel
Exibir arquivo Open project: yupe/yupe Class Usage Examples

Public Methods

Method Description
afterDelete ( )
attributeDescriptions ( ) : array
attributeLabels ( ) : array
beforeSave ( ) : boolean
beforeValidate ( ) : boolean
behaviors ( ) : array
get ( $id, array $with = ['posts', 'membersCount', 'createUser'] ) : mixed
getBySlug ( $id, array $with = ['posts', 'membersCount', 'createUser'] ) : mixed
getByUrl ( string $url = null ) : self Условие для получения блога по url
getList ( ) : mixed
getListForUser ( $userId ) : array | mixed
getMemberStatusList ( ) : array
getMembersList ( ) : UserToBlog
getMembershipListForUser ( $user ) : mixed
getPostStatusList ( ) : array
getPosts ( ) : Post
getPrivateBlogsForUser ( $userId ) : mixed
getStatus ( ) : string
getStatusList ( ) : array
getType ( ) : string
getTypeList ( ) : array
getUserMembership ( $userId ) : CActiveRecord
hasUserInStatus ( $userId, $status ) : mixed
isOwner ( $userId ) : boolean
isPrivate ( ) : boolean
join ( $userId ) : boolean
leave ( $userId ) : boolean | integer
model ( string $className = __CLASS__ ) : Blog Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
scopes ( ) : array
search ( ) : CActiveDataProvider
tableName ( ) : string
userIn ( $userId, integer $status = UserToBlog::STATUS_ACTIVE ) : boolean | integer

Method Details

afterDelete() public method

public afterDelete ( )

attributeDescriptions() public method

public attributeDescriptions ( ) : array
return array customized attribute descriptions (name=>description)

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

beforeSave() public method

public beforeSave ( ) : boolean
return boolean

beforeValidate() public method

public beforeValidate ( ) : boolean
return boolean

behaviors() public method

public behaviors ( ) : array
return array

get() public method

public get ( $id, array $with = ['posts', 'membersCount', 'createUser'] ) : mixed
$id
$with array
return mixed

getBySlug() public method

public getBySlug ( $id, array $with = ['posts', 'membersCount', 'createUser'] ) : mixed
$id
$with array
return mixed

getByUrl() public method

Условие для получения блога по url
public getByUrl ( string $url = null ) : self
$url string - url данного блога
return self

getList() public method

public getList ( ) : mixed
return mixed

getListForUser() public method

public getListForUser ( $userId ) : array | mixed
$userId
return array | mixed

getMemberStatusList() public method

public getMemberStatusList ( ) : array
return array

getMembersList() public method

public getMembersList ( ) : UserToBlog
return UserToBlog

getMembershipListForUser() public method

public getMembershipListForUser ( $user ) : mixed
$user
return mixed

getPostStatusList() public method

public getPostStatusList ( ) : array
return array

getPosts() public method

public getPosts ( ) : Post
return Post

getPrivateBlogsForUser() public method

public getPrivateBlogsForUser ( $userId ) : mixed
$userId
return mixed

getStatus() public method

public getStatus ( ) : string
return string

getStatusList() public method

public getStatusList ( ) : array
return array

getType() public method

public getType ( ) : string
return string

getTypeList() public method

public getTypeList ( ) : array
return array

getUserMembership() public method

public getUserMembership ( $userId ) : CActiveRecord
$userId
return CActiveRecord

hasUserInStatus() public method

public hasUserInStatus ( $userId, $status ) : mixed
$userId
$status
return mixed

isOwner() public method

public isOwner ( $userId ) : boolean
$userId
return boolean

isPrivate() public method

public isPrivate ( ) : boolean
return boolean

join() public method

public join ( $userId ) : boolean
$userId
return boolean

leave() public method

public leave ( $userId ) : boolean | integer
$userId
return boolean | integer

model() public static method

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Blog
$className string
return Blog the static model class

relations() public method

public relations ( ) : array
return array relational rules.

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

scopes() public method

public scopes ( ) : array
return array

tableName() public method

public tableName ( ) : string
return string the associated database table name

userIn() public method

public userIn ( $userId, integer $status = UserToBlog::STATUS_ACTIVE ) : boolean | integer
$userId
$status integer
return boolean | integer