interface DMSDocumentInterface (View source)

Interface for a DMSDocument used in the Document Management System. A DMSDocument is create by storing a File object in an instance of the DMSInterface. All write operations on the DMSDocument create a new relation, so we never need to explicitly call the write() method on the DMSDocument DataObject

Methods

public
string
getLink()

Returns a link to download this DMSDocument from the DMS store

public
getExtension()

Return the extension of the file associated with the document

public
string
getSize()

Returns the size of the file type in an appropriate format.

public
int
getAbsoluteSize()

Return the size of the file associated with the document, in bytes.

public
DMSDocumentInstance
replaceDocument($file)

Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file but keeping the rest of the document unchanged.

public
null
embargoIndefinitely()

Hides the DMSDocument, so it does not show up when getByPage($myPage) is called (without specifying the $showEmbargoed = true parameter). This is similar to expire, except that this method should be used to hide DMSDocuments that have not yet gone live.

public
bool
isHidden()

Returns if this is DMSDocument is embargoed or expired.

public
bool
isEmbargoed()

Returns if this is DMSDocument is embargoed.

public
null
embargoUntilDate($datetime)

Hides the DMSDocument, so it does not show up when getByPage($myPage) is called. Automatically un-hides the DMSDocument at a specific date.

public
null
embargoUntilPublished()

Hides the document until any page it is linked to is published

public
null
clearEmbargo()

Clears any previously set embargos, so the DMSDocument always shows up in all queries.

public
bool
isExpired()

Returns if this is DMSDocument is expired.

public
null
expireAtDate($datetime)

Hides the DMSDocument at a specific date, so it does not show up when getByPage($myPage) is called.

public
null
clearExpiry()

Clears any previously set expiry.

public
getVersions()

Returns a DataList of all previous Versions of this DMSDocument (check the LastEdited date of each object to find the correct one)

Details

Returns a link to download this DMSDocument from the DMS store

Return Value

string

getExtension()

Return the extension of the file associated with the document

string getSize()

Returns the size of the file type in an appropriate format.

Return Value

string

int getAbsoluteSize()

Return the size of the file associated with the document, in bytes.

Return Value

int

DMSDocumentInstance replaceDocument($file)

Takes a File object or a String (path to a file) and copies it into the DMS, replacing the original document file but keeping the rest of the document unchanged.

Parameters

$file

File object, or String that is path to a file to store

Return Value

DMSDocumentInstance

Document object that we replaced the file in

null embargoIndefinitely()

Hides the DMSDocument, so it does not show up when getByPage($myPage) is called (without specifying the $showEmbargoed = true parameter). This is similar to expire, except that this method should be used to hide DMSDocuments that have not yet gone live.

Return Value

null

bool isHidden()

Returns if this is DMSDocument is embargoed or expired.

Return Value

bool

True or False depending on whether this DMSDocument is embargoed or expired

bool isEmbargoed()

Returns if this is DMSDocument is embargoed.

Return Value

bool

True or False depending on whether this DMSDocument is embargoed

null embargoUntilDate($datetime)

Hides the DMSDocument, so it does not show up when getByPage($myPage) is called. Automatically un-hides the DMSDocument at a specific date.

Parameters

$datetime

String date time value when this DMSDocument should expire

Return Value

null

null embargoUntilPublished()

Hides the document until any page it is linked to is published

Return Value

null

null clearEmbargo()

Clears any previously set embargos, so the DMSDocument always shows up in all queries.

Return Value

null

bool isExpired()

Returns if this is DMSDocument is expired.

Return Value

bool

True or False depending on whether this DMSDocument is expired

null expireAtDate($datetime)

Hides the DMSDocument at a specific date, so it does not show up when getByPage($myPage) is called.

Parameters

$datetime

String date time value when this DMSDocument should expire

Return Value

null

null clearExpiry()

Clears any previously set expiry.

Return Value

null

DataList getVersions()

Returns a DataList of all previous Versions of this DMSDocument (check the LastEdited date of each object to find the correct one)

Return Value

DataList

List of DMSDocument objects