Detailed Description
InternalLink contains static methods for handling internal application links.
These links are useful in a scenario, where an object represents a page and several subobjects represent page elements.
Definition at line 22 of file InternalLink.php.
Static Public Member Functions | |
static | makeLink (ObjectId $oid) |
static | makeAnchorLink (ObjectId $oid, ObjectId $anchorOID, $anchorName=null) |
static | isLink ($link) |
static | getReferencedOID ($link) |
static | getAnchorOID ($link) |
static | getAnchorName ($link) |
Public Attributes | |
const | PROTOCOL_STR = "link://" |
Member Function Documentation
◆ makeLink()
|
static |
Make an internal link to an object.
- Parameters
-
$oid The id of the object to link to
- Returns
- The link
Definition at line 31 of file InternalLink.php.
◆ makeAnchorLink()
Make an internal link to an object.
- Parameters
-
$oid The object id of the object to link to $anchorOID The object id of the subobject to link to $anchorName The name inside the subobject to link to (null, if the object itself should be linked) (default: null)
- Returns
- The link
Definition at line 42 of file InternalLink.php.
◆ isLink()
|
static |
Test if a link is an internal link.
- Parameters
-
$link The link to test
- Returns
- Boolean whether the link is an internal link or not
Definition at line 55 of file InternalLink.php.
◆ getReferencedOID()
|
static |
Get the oid of the referenced object.
- Parameters
-
$link The link to process
- Returns
- The oid or null if no valid oid is referenced
Definition at line 64 of file InternalLink.php.
◆ getAnchorOID()
|
static |
Get the oid of the referenced subobject if any.
- Parameters
-
$link The link to process
- Returns
- The oid or null if no anchor is defined
Definition at line 78 of file InternalLink.php.
◆ getAnchorName()
|
static |
Get the name of the anchor inside the referenced subobject if any.
- Parameters
-
$link The link to process
- Returns
- The name or null if no anchor name is defined
Definition at line 92 of file InternalLink.php.
Member Data Documentation
◆ PROTOCOL_STR
const PROTOCOL_STR = "link://" |
Definition at line 24 of file InternalLink.php.