SeedDMS_Core_DocumentLink
in package
Class to represent a link between two document
Document links are to establish a reference from one document to another document. The owner of the document link may not be the same as the owner of one of the documents. Use SeedDMS_Core_Document::addDocumentLink() to add a reference to another document.
Tags
Table of Contents
Properties
- $_document : SeedDMS_Core_Document
- $_id : int
- $_public : int
- $_target : object
- $_user : object
- $_userID : int
Methods
- __construct() : mixed
- SeedDMS_Core_DocumentLink constructor.
- getAccessMode() : int
- Returns the access mode similar to a document
- getDocument() : SeedDMS_Core_Document
- getID() : int
- getTarget() : object
- getUser() : bool|SeedDMS_Core_User
- isPublic() : int
- isType() : mixed
- Check if this object is of type 'documentlink'.
Properties
$_document
protected
SeedDMS_Core_Document
$_document
reference to document this link belongs to
$_id
protected
int
$_id
internal id of document link
$_public
protected
int
$_public
1 if this link is public, or 0 if is only visible to the owner
$_target
protected
object
$_target
reference to target document this link points to
$_user
protected
object
$_user
user who is the owner of this link
$_userID
protected
int
$_userID
id of user who is the owner of this link
Methods
__construct()
SeedDMS_Core_DocumentLink constructor.
public
__construct( $id, $document, $target, $userID, $public) : mixed
Parameters
getAccessMode()
Returns the access mode similar to a document
public
getAccessMode(SeedDMS_Core_User $u, $source, $target) : int
There is no real access mode for document links, so this is just another way to add more access restrictions than the default restrictions. It is only called for public document links, not accessed by the owner or the administrator.
Parameters
- $u : SeedDMS_Core_User
-
user
- $source :
- $target :
Return values
int —either M_NONE or M_READ
getDocument()
public
getDocument() : SeedDMS_Core_Document
Return values
SeedDMS_Core_DocumentgetID()
public
getID() : int
Return values
intgetTarget()
public
getTarget() : object
Return values
objectgetUser()
public
getUser() : bool|SeedDMS_Core_User
Return values
bool|SeedDMS_Core_UserisPublic()
public
isPublic() : int
Return values
intisType()
Check if this object is of type 'documentlink'.
public
isType(string $type) : mixed
Parameters
- $type : string
-
type of object