abstract class AbstractDocumentHandler extends AbstractHandler (View source)

Properties

protected ObjectManager $objectManager from AbstractHandler
protected DocumentInterface $document
protected Packages $packages

Methods

ObjectManager
getObjectManager()

No description

setObjectManager(ObjectManager $objectManager)

No description

__construct(ObjectManager $objectManager, Packages $packages)

Create a new document handler with document to handle.

int
cleanPositions(bool $setPositions = true)

Clean positions for current entity siblings.

getDocument()

No description

makePrivate()

Make current document private moving its file to the secured /files/private folder.

makePublic()

Make current document public moving off its file from the secured /files/private folder into /files folder.

Response
getDownloadResponse()

Get a Response object to force download document.

Details

ObjectManager getObjectManager()

Return Value

ObjectManager

AbstractHandler setObjectManager(ObjectManager $objectManager)

Parameters

ObjectManager $objectManager

Return Value

AbstractHandler

__construct(ObjectManager $objectManager, Packages $packages)

Create a new document handler with document to handle.

Parameters

ObjectManager $objectManager
Packages $packages

int cleanPositions(bool $setPositions = true)

Clean positions for current entity siblings.

Parameters

bool $setPositions

Return Value

int Return the next position after the last entity

DocumentInterface getDocument()

Return Value

DocumentInterface

AbstractDocumentHandler setDocument(DocumentInterface $document)

Parameters

DocumentInterface $document

Return Value

AbstractDocumentHandler

makePrivate()

Make current document private moving its file to the secured /files/private folder.

You must explicitly call flush after this method.

makePublic()

Make current document public moving off its file from the secured /files/private folder into /files folder.

You must explicitly call flush after this method.

Response getDownloadResponse()

Get a Response object to force download document.

This method works for both private and public documents.

Be careful, this method will send headers.

Return Value

Response