PHP 클래스 eZ\Publish\Core\Repository\TrashService

상속: implements eZ\Publish\API\Repository\TrashService
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel

보호된 프로퍼티들

프로퍼티 타입 설명
$nameSchemaService eZ\Publish\Core\Repository\Helper\NameSchemaService
$persistenceHandler eZ\Publish\SPI\Persistence\Handler
$repository eZ\Publish\API\Repository\Repository
$settings array

공개 메소드들

메소드 설명
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Handler $handler, NameSchemaService $nameSchemaService, array $settings = [] ) Setups service with reference to repository object that created it & corresponding handler.
deleteTrashItem ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem ) Deletes a trash item.
emptyTrash ( ) Empties trash.
findTrashItems ( eZ\Publish\API\Repository\Values\Content\Query $query ) : eZ\Publish\API\Repository\Values\Content\SearchResult Returns a collection of Trashed locations contained in the trash.
loadTrashItem ( mixed $trashItemId ) : eZ\Publish\API\Repository\Values\Content\TrashItem Loads a trashed location object from its $id.
recover ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location Recovers the $trashedLocation at its original place if possible.
trash ( eZ\Publish\API\Repository\Values\Content\Location $location ) : null | eZ\Publish\API\Repository\Values\Content\TrashItem Sends $location and all its children to trash and returns the corresponding trash item.

보호된 메소드들

메소드 설명
buildDomainTrashItemObject ( eZ\Publish\SPI\Persistence\Content\Location\Trashed $spiTrashItem ) : eZ\Publish\API\Repository\Values\Content\TrashItem Builds the domain TrashItem object from provided persistence trash item.
getDateTime ( integer $timestamp ) : DateTime

메소드 상세

__construct() 공개 메소드

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Persistence\Handler $handler, NameSchemaService $nameSchemaService, array $settings = [] )
$repository eZ\Publish\API\Repository\Repository
$handler eZ\Publish\SPI\Persistence\Handler
$nameSchemaService eZ\Publish\Core\Repository\Helper\NameSchemaService
$settings array

buildDomainTrashItemObject() 보호된 메소드

Builds the domain TrashItem object from provided persistence trash item.
protected buildDomainTrashItemObject ( eZ\Publish\SPI\Persistence\Content\Location\Trashed $spiTrashItem ) : eZ\Publish\API\Repository\Values\Content\TrashItem
$spiTrashItem eZ\Publish\SPI\Persistence\Content\Location\Trashed
리턴 eZ\Publish\API\Repository\Values\Content\TrashItem

deleteTrashItem() 공개 메소드

The corresponding content object will be removed
public deleteTrashItem ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem )
$trashItem eZ\Publish\API\Repository\Values\Content\TrashItem

emptyTrash() 공개 메소드

All locations contained in the trash will be removed. Content objects will be removed if all locations of the content are gone.
public emptyTrash ( )

findTrashItems() 공개 메소드

$query allows to filter/sort the elements to be contained in the collection.
public findTrashItems ( eZ\Publish\API\Repository\Values\Content\Query $query ) : eZ\Publish\API\Repository\Values\Content\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
리턴 eZ\Publish\API\Repository\Values\Content\SearchResult

getDateTime() 보호된 메소드

protected getDateTime ( integer $timestamp ) : DateTime
$timestamp integer
리턴 DateTime

loadTrashItem() 공개 메소드

Note that $id is identical to original location, which has been previously trashed
public loadTrashItem ( mixed $trashItemId ) : eZ\Publish\API\Repository\Values\Content\TrashItem
$trashItemId mixed
리턴 eZ\Publish\API\Repository\Values\Content\TrashItem

recover() 공개 메소드

Recovers the $trashedLocation at its original place if possible.
public recover ( eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem, eZ\Publish\API\Repository\Values\Content\Location $newParentLocation = null ) : eZ\Publish\API\Repository\Values\Content\Location
$trashItem eZ\Publish\API\Repository\Values\Content\TrashItem
$newParentLocation eZ\Publish\API\Repository\Values\Content\Location
리턴 eZ\Publish\API\Repository\Values\Content\Location the newly created or recovered location

trash() 공개 메소드

Content is left untouched.
public trash ( eZ\Publish\API\Repository\Values\Content\Location $location ) : null | eZ\Publish\API\Repository\Values\Content\TrashItem
$location eZ\Publish\API\Repository\Values\Content\Location
리턴 null | eZ\Publish\API\Repository\Values\Content\TrashItem null if location was deleted, otherwise TrashItem

프로퍼티 상세

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

protected NameSchemaService,eZ\Publish\Core\Repository\Helper $nameSchemaService
리턴 eZ\Publish\Core\Repository\Helper\NameSchemaService

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

protected Handler,eZ\Publish\SPI\Persistence $persistenceHandler
리턴 eZ\Publish\SPI\Persistence\Handler

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

protected Repository,eZ\Publish\API\Repository $repository
리턴 eZ\Publish\API\Repository\Repository

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

protected array $settings
리턴 array