PHP Class Lavary\Menu\Link

Datei anzeigen Open project: lavary/laravel-menu

Public Properties

Property Type Description
$attributes array Link attributes
$isActive boolean Flag for active state

Protected Properties

Property Type Description
$href string Explicit href for the link
$path array Path Information

Public Methods

Method Description
__construct ( array $path = [] ) : void Creates a hyper link instance
__get ( $prop ) : void Check for a method of the same name if the attribute doesn't exist.
active ( ) : Lavary\Menu\Link Make the anchor active
attr ( ) : string | Lavary\Menu\Link Add attributes to the link
href ( $href ) : Lavary\Menu\Link Set Anchor's href property
secure ( ) : Lavary\Menu\Item Make the url secure

Method Details

__construct() public method

Creates a hyper link instance
public __construct ( array $path = [] ) : void
$path array
return void

__get() public method

Check for a method of the same name if the attribute doesn't exist.
public __get ( $prop ) : void
return void

active() public method

Make the anchor active
public active ( ) : Lavary\Menu\Link
return Lavary\Menu\Link

attr() public method

Add attributes to the link
public attr ( ) : string | Lavary\Menu\Link
return string | Lavary\Menu\Link

href() public method

Set Anchor's href property
public href ( $href ) : Lavary\Menu\Link
return Lavary\Menu\Link

secure() public method

Make the url secure
public secure ( ) : Lavary\Menu\Item
return Lavary\Menu\Item

Property Details

$attributes public_oe property

Link attributes
public array $attributes
return array

$href protected_oe property

Explicit href for the link
protected string $href
return string

$isActive public_oe property

Flag for active state
public bool $isActive
return boolean

$path protected_oe property

Path Information
protected array $path
return array