PHP 트레잇 SoftDelete\Model\Table\SoftDeleteTrait

파일 보기 프로젝트 열기: pgbi/cakephp3-soft-delete

공개 메소드들

메소드 설명
deleteAll ( $conditions ) : integer Soft deletes all records matching $conditions.
getSoftDeleteField ( ) : string Get the configured deletion field
hardDelete ( Cake\Datasource\EntityInterface $entity ) : boolean Hard deletes the given $entity.
hardDeleteAll ( Datetime $until ) : integer Hard deletes all records that were soft deleted before a given date.
query ( )
restore ( Cake\Datasource\EntityInterface $entity ) : boolean Restore a soft deleted entity into an active state.

보호된 메소드들

메소드 설명
_processDelete ( Cake\DataSource\EntityInterface $entity, ArrayObject $options ) : boolean Perform the delete operation.

메소드 상세

_processDelete() 보호된 메소드

Will soft delete the entity provided. Will remove rows from any dependent associations, and clear out join tables for BelongsToMany associations.
protected _processDelete ( Cake\DataSource\EntityInterface $entity, ArrayObject $options ) : boolean
$entity Cake\DataSource\EntityInterface The entity to soft delete.
$options ArrayObject The options for the delete.
리턴 boolean success

deleteAll() 공개 메소드

Soft deletes all records matching $conditions.
public deleteAll ( $conditions ) : integer
리턴 integer number of affected rows.

getSoftDeleteField() 공개 메소드

Get the configured deletion field
public getSoftDeleteField ( ) : string
리턴 string

hardDelete() 공개 메소드

Hard deletes the given $entity.
public hardDelete ( Cake\Datasource\EntityInterface $entity ) : boolean
$entity Cake\Datasource\EntityInterface
리턴 boolean true in case of success, false otherwise.

hardDeleteAll() 공개 메소드

Hard deletes all records that were soft deleted before a given date.
public hardDeleteAll ( Datetime $until ) : integer
$until Datetime Date until which soft deleted records must be hard deleted.
리턴 integer number of affected rows.

query() 공개 메소드

public query ( )

restore() 공개 메소드

Restore a soft deleted entity into an active state.
public restore ( Cake\Datasource\EntityInterface $entity ) : boolean
$entity Cake\Datasource\EntityInterface Entity to be restored.
리턴 boolean true in case of success, false otherwise.