Get the text definition.
void
__construct
([ $textDefinition = ''], string $textDefinition,)
-
string
$textDefinition,: teh full definition for this Link format : linkType|internalLink|externalLink|target|use-pop-up|Link label;
-
$textDefinition
Get : an attribute from array
string,
getAttribute
( $k, string $k,)
-
string
$k,: The key of wanted attribute
-
$k
Get : All the attributes
array(key=>value)
getAttributes
()
Get all attributes as a string
string
getAttributesString
()
Gets the URL of the external link
string
getExternalLink
()
Gets the URL of a link towards a file managed by this application
string
getFileLink
([boolean $withPath = false], [string $module = MOD_STANDARD_CODENAME], [string $dataLocation = RESOURCE_DATA_LOCATION_EDITED], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true])
-
boolean
$withPath: If false, only returns the filename
-
string
$module: If false, only returns the filename
-
string
$dataLocation: Where does the data lies ? See CMS_resource constants
-
integer
$relativeTo: Can be web root or filesystem relative, see base constants
-
boolean
$withFilename: Should the function return the filename too or only the path ?
Get : a full XHTML a tag
string,
getHTML
([ $label = false], [string $module = MOD_STANDARD_CODENAME], [string $dataLocation = RESOURCE_DATA_LOCATION_EDITED], [ $attrs = false], [ $hrefOnly = false], string $attrs,)
-
string
$module: If false, only returns the filename
-
string
$dataLocation: Where does the data lies ? @see CMS_resource constants
-
string
$attrs,: any attributes to append into A tag
-
$label
-
$attrs
-
$hrefOnly
Gets the internal link (a page ID)
integer
getInternalLink
()
Gets the internal link (a page or false if no link)
Get : The label
string
getLabel
()
Gets the type of the link
string
getLinkType
()
Get : an attribute from array
array()
getPopup
()
Get : The separator
string
getSeparator
()
Get : The target
string
getTarget
()
Returns the String definition well formatted format : {{lynkType}}{{sep}}{{internalLink}}{{sep}}{{externalLink}}{{sep}}{{fileLink}}{{sep}}{{attributes}}{{sep}}{{pop-width}},{{pop-height}}{{sep}}
string
getTextDefinition
()
Checks the presence of a valid HREF in this link definition
boolean
hasValidHREF
()
Set : an attribute
boolean
setAttribute
( $k, $v, string $k,, string $v,)
-
string
$k,: The key of wanted attribute
-
string
$v,: the value corresponding to key
-
$k
-
$v
Set : The attributes
boolean
setAttributes
(array(key=>value) $attrs)
Sets the external link Reset the target to "_blank"
boolean
setExternalLink
(string $url)
-
string
$url: The url to set
Sets the link to a file Reset the target to "_blank"
boolean
setFileLink
( $s, [ $module = ''], string $s,, string $module,)
-
string
$s,: The link to set (filename only or full location)
-
string
$module,: the module codename owning this file
-
$s
-
$module
Sets the internal link Reset the target to "_top"
boolean
setInternalLink
(integer $pageID)
-
integer
$pageID: The DB ID of the page linked
Set : The label
boolean
setLabel
( $s, string $s,)
-
string
$s,: the label to set
-
$s
Sets the type of link
boolean
setLinkType
(integer $type)
-
integer
$type: The type to set
Set : an attribute
boolean
setPopup
( $width, $height, integer $width,, integer $height,)
-
integer
$width,: window width to open
-
integer
$height,: window height to open
-
$width
-
$height
Set : The target
boolean
setTarget
( $s, string $s,)
-
string
$s,: the target
-
$s
Inherited Methods
Inherited From CMS_grandFather
CMS_grandFather::autoload()
CMS_grandFather::hasError()
CMS_grandFather::log()
CMS_grandFather::PHPErrorHandler()
CMS_grandFather::raiseError()
CMS_grandFather::setDebug()
CMS_grandFather::setLog()
CMS_grandFather::_raiseError()
CMS_grandFather::__call()