PHP Class App\Source\Composite\MenuLink

Show file Open project: andrey900/slimcms

Public Properties

Property Type Description
$attributes array Hyperlink's attributes
$text string Hyperlink's text
$url string Hyperlink's URL

Public Methods

Method Description
__construct ( $text, string $url, array $attributes = [] ) : void Creates a hyperlink
append ( $content ) : Link Append content at the end of hyperlink's text
attributes ( $arAttr = null, $value = null ) : Link Add attributes to the hyperlink
get_text ( ) : string Return hyperlink's title
get_url ( ) : string Return hyperlink's URL
prepend ( $content ) : Link Add content at the beginning of hyperlink's text

Method Details

__construct() public method

Creates a hyperlink
public __construct ( $text, string $url, array $attributes = [] ) : void
$url string
$attributes array
return void

append() public method

Append content at the end of hyperlink's text
public append ( $content ) : Link
return Link

attributes() public method

Add attributes to the hyperlink
public attributes ( $arAttr = null, $value = null ) : Link
return Link

get_text() public method

Return hyperlink's title
public get_text ( ) : string
return string $title

get_url() public method

Return hyperlink's URL
public get_url ( ) : string
return string $url

prepend() public method

Add content at the beginning of hyperlink's text
public prepend ( $content ) : Link
return Link

Property Details

$attributes public property

Hyperlink's attributes
public array $attributes
return array

$text public property

Hyperlink's text
public string $text
return string

$url public property

Hyperlink's URL
public string $url
return string