PHP 클래스 Venturecraft\Revisionable\Revisionable

상속: extends Illuminate\Database\Eloquent\Model
파일 보기 프로젝트 열기: venturecraft/revisionable

보호된 프로퍼티들

프로퍼티 타입 설명
$dirtyData array Keeps the list of values that have been updated

공개 메소드들

메소드 설명
boot ( ) Create the event listeners for the saving and saved events This lets us save revisions whenever a save is made, no matter the http method.
disableRevisionField ( mixed $field ) : void Disable a revisionable field temporarily Need to do the adding to array longhanded, as there's a PHP bug https://bugs.php.net/bug.php?id=42030
getRevisionFormattedFieldNames ( ) : mixed
getRevisionFormattedFields ( ) : mixed
getRevisionNullString ( ) : string Revision Unknown String When displaying revision history, when a foreign key is updated instead of displaying the ID, you can choose to display a string of your choice, just override this method in your model By default, it will fall back to the models ID.
getRevisionUnknownString ( ) : string No revision string When displaying revision history, if the revisions value cant be figured out, this is used instead.
identifiableName ( ) : string Identifiable Name When displaying revision history, when a foreign key is updated instead of displaying the ID, you can choose to display a string of your choice, just override this method in your model By default, it will fall back to the models ID.
postCreate ( ) Called after record successfully created
postDelete ( ) If softdeletes are enabled, store the deleted time
postSave ( ) : void Called after a model is successfully saved.
preSave ( ) : boolean Invoked before a model is saved. Return false to abort the operation.
revisionHistory ( ) : mixed

비공개 메소드들

메소드 설명
changedRevisionableFields ( ) : array Get all of the changes that have been made, that are also supposed to have their changes recorded
getSystemUserId ( ) Attempt to find the user id of the currently logged in user Supports Cartalyst Sentry/Sentinel based authentication, as well as stock Auth
isRevisionable ( string $key ) : boolean Check if this field should have a revision kept
isSoftDelete ( ) : boolean Check if soft deletes are currently enabled on this model

메소드 상세

boot() 공개 정적인 메소드

Create the event listeners for the saving and saved events This lets us save revisions whenever a save is made, no matter the http method.
public static boot ( )

disableRevisionField() 공개 메소드

Disable a revisionable field temporarily Need to do the adding to array longhanded, as there's a PHP bug https://bugs.php.net/bug.php?id=42030
public disableRevisionField ( mixed $field ) : void
$field mixed
리턴 void

getRevisionFormattedFieldNames() 공개 메소드

getRevisionFormattedFields() 공개 메소드

public getRevisionFormattedFields ( ) : mixed
리턴 mixed

getRevisionNullString() 공개 메소드

Revision Unknown String When displaying revision history, when a foreign key is updated instead of displaying the ID, you can choose to display a string of your choice, just override this method in your model By default, it will fall back to the models ID.
public getRevisionNullString ( ) : string
리턴 string an identifying name for the model

getRevisionUnknownString() 공개 메소드

It can be overridden.
public getRevisionUnknownString ( ) : string
리턴 string an identifying name for the model

identifiableName() 공개 메소드

Identifiable Name When displaying revision history, when a foreign key is updated instead of displaying the ID, you can choose to display a string of your choice, just override this method in your model By default, it will fall back to the models ID.
public identifiableName ( ) : string
리턴 string an identifying name for the model

postCreate() 공개 메소드

Called after record successfully created
public postCreate ( )

postDelete() 공개 메소드

If softdeletes are enabled, store the deleted time
public postDelete ( )

postSave() 공개 메소드

Called after a model is successfully saved.
public postSave ( ) : void
리턴 void

preSave() 공개 메소드

Invoked before a model is saved. Return false to abort the operation.
public preSave ( ) : boolean
리턴 boolean

revisionHistory() 공개 메소드

public revisionHistory ( ) : mixed
리턴 mixed

프로퍼티 상세

$dirtyData 보호되어 있는 프로퍼티

Keeps the list of values that have been updated
protected array $dirtyData
리턴 array