PHP Class Xpressengine\Document\Models\Document

Config를 설정할 때 division 을 사용하는 경우에는 이 모델의 table 이름을 division table 이름으로 변경합니다.
Author: XE Developers ([email protected])
Inheritance: extends Xpressengine\Database\Eloquent\DynamicModel
Show file Open project: xpressengine/xpressengine Class Usage Examples

Public Properties

Property Type Description
$incrementing
$table

Protected Properties

Property Type Description
$approves array
$casts
$config
$connection string Virtual connection name.
$displays array
$division
$dynamic use dynamic query
$fillable
$hidden
$publishes array
$replyCharLen
$statuses array

Public Methods

Method Description
checkRequired ( array $attributes ) : void Check required attributes
fixedAttributes ( array $attributes ) : array Set default value to attributes
getDepth ( ) : float 덧글의 depth 반환
getPureContent ( string $content ) : string HTML 코드를 제거한 pureContent 반환
getReplyCharLen ( ) : integer Reply character length
setApprove ( ) 승인
setApproveWait ( ) 승인 대기
setApproved ( string $approved ) : void 승인 상태 변경
setConfig ( ConfigEntity $config, string | null $table = null ) : void set config
setDisplay ( string $display ) : void change documents display condition
setNotice ( boolean $notice = true ) 공지 상태로 변경
setPublish ( ) 발행
setPublished ( string $published ) : void change documents publish condition
setReject ( ) 승인 신청 거절
setReply ( ) : void Set reply attributes value
setReplyCharLen ( integer $len ) : void Set reply character length
setReserve ( ) 발행 예약
setRestore ( ) 휴지통 문서 복구
setStatus ( string $status ) : void change documents status condition
setTemporary ( ) 임시저장
setTrash ( ) 휴지통
user ( ) : BelongsTo user relationship

Protected Methods

Method Description
getReplyChar ( Document $parent ) : string get reply code
makeReplyChar ( string $prevChars = null ) : string Make next reply code characters
performDeleteOnModel ( ) : void Perform a model delete operation.
performInsert ( Builder $query, array $options = [] ) : boolean Perform a model insert operation.
performUpdate ( Builder $query, array $options = [] ) : boolean Perform a model update operation.

Method Details

checkRequired() public method

Check required attributes
public checkRequired ( array $attributes ) : void
$attributes array attributes
return void

fixedAttributes() public method

Set default value to attributes
public fixedAttributes ( array $attributes ) : array
$attributes array attributes
return array

getDepth() public method

덧글의 depth 반환
public getDepth ( ) : float
return float

getPureContent() public method

HTML 코드를 제거한 pureContent 반환
public getPureContent ( string $content ) : string
$content string content
return string

getReplyChar() protected method

get reply code
protected getReplyChar ( Document $parent ) : string
$parent Document Parent document model
return string

getReplyCharLen() public static method

Reply character length
public static getReplyCharLen ( ) : integer
return integer

makeReplyChar() protected method

Make next reply code characters
protected makeReplyChar ( string $prevChars = null ) : string
$prevChars string previous child reply code character
return string

performDeleteOnModel() protected method

Perform a model delete operation.
protected performDeleteOnModel ( ) : void
return void

performInsert() protected method

Perform a model insert operation.
protected performInsert ( Builder $query, array $options = [] ) : boolean
$query Illuminate\Database\Eloquent\Builder Illuminate database eloquent builder
$options array options
return boolean

performUpdate() protected method

Perform a model update operation.
protected performUpdate ( Builder $query, array $options = [] ) : boolean
$query Illuminate\Database\Eloquent\Builder Illuminate database eloquent builder
$options array options
return boolean

setApprove() public method

승인
public setApprove ( )

setApproveWait() public method

승인 대기
public setApproveWait ( )

setApproved() public method

승인 상태 변경
public setApproved ( string $approved ) : void
$approved string condition value. 'approved':승인됨, 'waiting':대기중, 'rejected':거절됨
return void

setConfig() public method

set config
public setConfig ( ConfigEntity $config, string | null $table = null ) : void
$config Xpressengine\Config\ConfigEntity document config entity
$table string | null table name
return void

setDisplay() public method

change documents display condition
public setDisplay ( string $display ) : void
$display string condition value 'visible':보여짐, 'secret':비밀글, 'hidden':숨김
return void

setNotice() public method

공지 상태로 변경
public setNotice ( boolean $notice = true )
$notice boolean is notice

setPublish() public method

발행
public setPublish ( )

setPublished() public method

change documents publish condition
public setPublished ( string $published ) : void
$published string condition value. 'published':발행됨, 'waiting':대기중, 'reserved':발행예약됨, 'rejected':거절됨
return void

setReject() public method

승인 신청 거절
public setReject ( )

setReply() public method

Set reply attributes value
public setReply ( ) : void
return void

setReplyCharLen() public static method

Set reply character length
public static setReplyCharLen ( integer $len ) : void
$len integer reply character length
return void

setReserve() public method

발행 예약
public setReserve ( )

setRestore() public method

휴지통 문서 복구
public setRestore ( )

setStatus() public method

change documents status condition
public setStatus ( string $status ) : void
$status string condition value. 'usual':일반, 'temp':임시저장글, 'trash':휴지통글
return void

setTemporary() public method

임시저장
public setTemporary ( )

setTrash() public method

휴지통
public setTrash ( )

user() public method

user relationship
public user ( ) : BelongsTo
return Illuminate\Database\Eloquent\Relations\BelongsTo

Property Details

$approves protected property

protected array $approves
return array

$casts protected property

protected $casts

$config protected property

protected $config

$connection protected property

Virtual connection name.
protected string $connection
return string

$displays protected property

protected array $displays
return array

$division protected property

protected $division

$dynamic protected property

use dynamic query
protected $dynamic

$fillable protected property

protected $fillable

$hidden protected property

protected $hidden

$incrementing public property

public $incrementing

$publishes protected property

protected array $publishes
return array

$replyCharLen protected static property

protected static $replyCharLen

$statuses protected property

protected array $statuses
return array

$table public property

public $table