DMSDocumentInterface
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
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.
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.
Hides the DMSDocument, so it does not show up when getByPage($myPage) is called. Automatically un-hides the DMSDocument at a specific date.
Clears any previously set embargos, so the DMSDocument always shows up in all queries.
Hides the DMSDocument at a specific date, so it does not show up when getByPage($myPage) is called.
Returns a DataList of all previous Versions of this DMSDocument (check the LastEdited date of each object to find the correct one)
Details
string
getLink()
Returns a link to download this DMSDocument from the DMS store
getExtension()
Return the extension of the file associated with the document
string
getSize()
Returns the size of the file type in an appropriate format.
int
getAbsoluteSize()
Return the size of the file associated with the document, in bytes.
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.
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.
bool
isHidden()
Returns if this is DMSDocument is embargoed or expired.
bool
isEmbargoed()
Returns if this is 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.
null
embargoUntilPublished()
Hides the document until any page it is linked to is published
null
clearEmbargo()
Clears any previously set embargos, so the DMSDocument always shows up in all queries.
bool
isExpired()
Returns if this is DMSDocument is expired.
null
expireAtDate($datetime)
Hides the DMSDocument at a specific date, so it does not show up when getByPage($myPage) is called.
null
clearExpiry()
Clears any previously set expiry.
DataList
getVersions()
Returns a DataList of all previous Versions of this DMSDocument (check the LastEdited date of each object to find the correct one)