Html

Spatie\Menu\Html

  • Implements Spatie\Menu\Activatable, Spatie\Menu\HasParentAttributes, Spatie\Menu\Item

raw

/**
 * Create an item containing a chunk of raw html.
 *
 * @param string $html
 *
 * @return static
 */
public static function raw(string $html)

getHtml

/**
 * @return string
 */
public function getHtml() : string

render

/**
 * @return string
 */
public function render() : string

isActive

/**
 * @return bool
 */
public function isActive() : bool

setActive

/**
 * @return $this
 */
public function setActive()

setInactive

/**
 * @return $this
 */
public function setInactive()

getParentAttributes

/**
 * Return an array of attributes to apply on the parent. This generally means
 * the attributes that should be applied on the <li> tag.
 *
 * @return array
 */
public function getParentAttributes() : array

setParentAttribute

/**
 * @param string $attribute
 * @param string $value
 *
 * @return $this
 */
public function setParentAttribute(string $attribute, string $value = '')

addParentClass

/**
 * @param string $class
 *
 * @return $this
 */
public function addParentClass(string $class)

Spatie\Menu\Laravel\Html

  • Extends Spatie\Menu\Html
  • Uses Illuminate\Support\Traits\Macroable