PHP Class Spatie\Menu\Html

Inheritance: implements Spatie\Menu\Item, implements Spatie\Menu\Activatable, implements Spatie\Menu\HasParentAttributes, use trait Spatie\Menu\Traits\Activatable, use trait Spatie\Menu\Traits\HasParentAttributes
Show file Open project: spatie/menu Class Usage Examples

Protected Properties

Property Type Description
$active boolean
$html string
$parentAttributes Spatie\HtmlElement\Attributes
$url string | null

Public Methods

Method Description
html ( ) : string
raw ( string $html ) : static Create an item containing a chunk of raw html.
render ( ) : string

Protected Methods

Method Description
__construct ( string $html )

Method Details

__construct() protected method

protected __construct ( string $html )
$html string

html() public method

public html ( ) : string
return string

raw() public static method

Create an item containing a chunk of raw html.
public static raw ( string $html ) : static
$html string
return static

render() public method

public render ( ) : string
return string

Property Details

$active protected property

protected bool $active
return boolean

$html protected property

protected string $html
return string

$parentAttributes protected property

protected Attributes,Spatie\HtmlElement $parentAttributes
return Spatie\HtmlElement\Attributes

$url protected property

protected string|null $url
return string | null