LocalTaskInterface
interface LocalTaskInterface (View source)
Defines an interface for menu local tasks.
Menu local tasks are typically rendered as navigation tabs above the content region, though other presentations are possible. It is convention that the titles of these tasks should be short verbs if possible.
Methods
Get the route name from the settings.
Returns the localized title to be shown for this tab.
Returns the route parameters needed to render a link for the local task.
Returns the weight of the local task.
Returns options for rendering a link to the local task.
Sets the active status.
Gets the active status.
Details
string
getRouteName()
Get the route name from the settings.
string
getTitle()
Returns the localized title to be shown for this tab.
Subclasses may add optional arguments like NodeInterface $node = NULL that will be supplied by the ControllerResolver.
array
getRouteParameters(RouteMatchInterface $route_match)
Returns the route parameters needed to render a link for the local task.
int|null
getWeight()
Returns the weight of the local task.
array
getOptions(RouteMatchInterface $route_match)
Returns options for rendering a link to the local task.
$this
setActive(bool $active = TRUE)
Sets the active status.
bool
getActive()
Gets the active status.