TrashManager
class TrashManager
TrashManager
- Xpressengine에서 사용되는 휴지통을 관리하고 휴지통 비우기 처리
- 휴지통은 별도의 데이터를 담고 있지 않고 휴지통을 비우는 요청이 발생할 경우 구현체를 실행함
- 실제 데이터를 삭제하는 과정은 각 구현체가 직접 처리
TrashManager 에 휴지통 등록
XeTrash::register(NAME_SPACE\CLASS_NAME::class);
휴지통 요약 정보 확인
$bins = XeTrash::gets();
foreach ($bins as $bin) {
echo $bin::summary();
}
전체 휴지통 비우기
XeTrash::clean();
Command
- 휴지통을 위한 command 제공
휴지통 정보 확인
php artisan trash
php artisan trash recycle-bin-name
php artisan trash recycle-bin-name1,recycle-bin-name2,..
휴지통 비우기
php artisan trash:clean
php artisan trash:clean recycle-bin-name
php artisan trash:clean recycle-bin-name1,recycle-bin-name2,..
Constants
REGISTER_KEY |
|
Properties
protected Container | $register | ||
protected VirtualConnectionInterface | $conn |
Methods
void
register(string $className)
휴지통 등록
gets()
전체 휴지통 반환
get(string $name)
휴지통 반환
array
bins()
휴지통 이름 반환
Details
at line 107
__construct(Container $register, VirtualConnectionInterface $conn)
create instance
at line 121
void
register(string $className)
휴지통 등록
at line 131
RecycleBinInterface[]
gets()
전체 휴지통 반환
at line 142
RecycleBinInterface
get(string $name)
휴지통 반환
at line 157
array
bins()
휴지통 이름 반환
at line 174
void
clean(array $bins = array(), Closure $callback = null)
휴지통 비우기