interface LocalActionInterface (View source)

Defines an interface for menu local actions.

Methods

string
getRouteName()

Get the route name from the settings.

array
getRouteParameters(RouteMatchInterface $route_match)

Returns the route parameters needed to render a link for the local action.

int
getWeight()

Returns the weight for the local action.

array
getOptions(RouteMatchInterface $route_match)

Returns options for rendering a link for the local action.

string
getTitle()

Returns the localized title to be shown for this action.

Details

string getRouteName()

Get the route name from the settings.

Return Value

string

The name of the route this action links to.

array getRouteParameters(RouteMatchInterface $route_match)

Returns the route parameters needed to render a link for the local action.

Parameters

RouteMatchInterface $route_match

The current route match.

Return Value

array

An array of parameter names and values.

int getWeight()

Returns the weight for the local action.

Return Value

int

array getOptions(RouteMatchInterface $route_match)

Returns options for rendering a link for the local action.

Parameters

RouteMatchInterface $route_match

The current route match.

Return Value

array

An associative array of options.

string getTitle()

Returns the localized title to be shown for this action.

Subclasses may add optional arguments like NodeInterface $node = NULL that will be supplied by the ControllerResolver.

Return Value

string

The title to be shown for this action.

See also

LocalActionManager::getTitle