class MenuItem extends Component (View source)

Traits

Conditionable
Tappable

Properties

protected string $evaluationIdentifier from  EvaluatesClosures
static protected Closure>> $macros from  Macroable
protected string $color
protected string|Closure|null $icon
protected string|Closure|null $label
protected string|Closure|null $postAction
protected int|Closure|null $sort
protected Native|null $url
protected bool|Closure $shouldOpenUrlInNewTab
protected bool|Closure $isHidden
protected bool|Closure $isVisible

Methods

static mixed
configureUsing(Closure $modifyUsing, Closure|null $during = null, bool $isImportant = false)

No description

configure()

No description

void
setUp()

No description

mixed
evaluate(mixed $value, array $namedInjections = [], array $typedInjections = [])

No description

mixed
resolveClosureDependencyForEvaluation(ReflectionParameter $parameter, array $namedInjections, array $typedInjections)

No description

array
resolveDefaultClosureDependencyForEvaluationByName(string $parameterName)

No description

array
resolveDefaultClosureDependencyForEvaluationByType(string $parameterType)

No description

string|null
static void
macro(string $name, callable $macro)

No description

static void
mixin(object $mixin, bool $replace = true)

No description

static void
flushMacros()

No description

static mixed
__callStatic(string $method, array $parameters)

No description

mixed
__call(string $method, array $parameters)

No description

static callable|null
getMacro(string $method)

No description

__construct()

No description

static MenuItem
make()

No description

color(string|array|Closure|null $color)

No description

icon(string|Closure|null $icon)

No description

label(string|Closure|null $label)

No description

postAction(string|Closure|null $action)

No description

sort(int|Closure|null $sort)

No description

url(string|Closure|null $url, bool|Closure $shouldOpenInNewTab = false)

No description

openUrlInNewTab(bool|Closure $condition = true)

No description

hidden(bool|Closure $condition = true)

No description

visible(bool|Closure $condition = true)

No description

bool
isVisible()

No description

bool
isHidden()

No description

string|array|null
getColor()

No description

string|null
getIcon()

No description

string|null
getLabel()

No description

string|null
getPostAction()

No description

int
getSort()

No description

string|null
getUrl()

No description

bool
shouldOpenUrlInNewTab()

No description

Details

static mixed configureUsing(Closure $modifyUsing, Closure|null $during = null, bool $isImportant = false)

No description

Parameters

Closure $modifyUsing
Closure|null $during
bool $isImportant

Return Value

mixed

Configurable configure()

No description

Return Value

Configurable

protected void setUp()

No description

Return Value

void

mixed evaluate(mixed $value, array $namedInjections = [], array $typedInjections = [])

No description

Parameters

mixed $value
array $namedInjections
array $typedInjections

Return Value

mixed

protected mixed resolveClosureDependencyForEvaluation(ReflectionParameter $parameter, array $namedInjections, array $typedInjections)

No description

Parameters

ReflectionParameter $parameter
array $namedInjections
array $typedInjections

Return Value

mixed

protected array resolveDefaultClosureDependencyForEvaluationByName(string $parameterName)

No description

Parameters

string $parameterName

Return Value

array

protected array resolveDefaultClosureDependencyForEvaluationByType(string $parameterType)

No description

Parameters

string $parameterType

Return Value

array

protected string|null getTypedReflectionParameterClassName(ReflectionParameter $parameter)

No description

Parameters

ReflectionParameter $parameter

Return Value

string|null

static void macro(string $name, callable $macro)

No description

Parameters

string $name
callable $macro

Return Value

void

static void mixin(object $mixin, bool $replace = true)

No description

Parameters

object $mixin
bool $replace

Return Value

void

static void flushMacros()

No description

Return Value

void

static mixed __callStatic(string $method, array $parameters)

No description

Parameters

string $method
array $parameters

Return Value

mixed

mixed __call(string $method, array $parameters)

No description

Parameters

string $method
array $parameters

Return Value

mixed

static protected callable|null getMacro(string $method)

No description

Parameters

string $method

Return Value

callable|null

final __construct()

No description

static MenuItem make()

No description

Return Value

MenuItem

MenuItem color(string|array|Closure|null $color)

No description

Parameters

string|array|Closure|null $color

Return Value

MenuItem

MenuItem icon(string|Closure|null $icon)

No description

Parameters

string|Closure|null $icon

Return Value

MenuItem

MenuItem label(string|Closure|null $label)

No description

Parameters

string|Closure|null $label

Return Value

MenuItem

MenuItem postAction(string|Closure|null $action)

No description

Parameters

string|Closure|null $action

Return Value

MenuItem

MenuItem sort(int|Closure|null $sort)

No description

Parameters

int|Closure|null $sort

Return Value

MenuItem

MenuItem url(string|Closure|null $url, bool|Closure $shouldOpenInNewTab = false)

No description

Parameters

string|Closure|null $url
bool|Closure $shouldOpenInNewTab

Return Value

MenuItem

MenuItem openUrlInNewTab(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

MenuItem

MenuItem hidden(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

MenuItem

MenuItem visible(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

MenuItem

bool isVisible()

No description

Return Value

bool

bool isHidden()

No description

Return Value

bool

string|array|null getColor()

No description

Return Value

string|array|null

| array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | null

string|null getIcon()

No description

Return Value

string|null

string|null getLabel()

No description

Return Value

string|null

string|null getPostAction()

No description

Return Value

string|null

int getSort()

No description

Return Value

int

string|null getUrl()

No description

Return Value

string|null

bool shouldOpenUrlInNewTab()

No description

Return Value

bool