Drupal 8  8.0.2
LocalTaskDefault Class Reference
Inheritance diagram for LocalTaskDefault:

Public Member Functions

 getRouteName ()
 
 getRouteParameters (RouteMatchInterface $route_match)
 
 getTitle (Request $request=NULL)
 
 getWeight ()
 
 getOptions (RouteMatchInterface $route_match)
 
 setActive ($active=TRUE)
 
 getActive ()
 
 getCacheTags ()
 
 getCacheContexts ()
 
 getCacheMaxAge ()
 
- Public Member Functions inherited from PluginBase
 __construct (array $configuration, $plugin_id, $plugin_definition)
 
 getPluginId ()
 
 getBaseId ()
 
 getDerivativeId ()
 
 getPluginDefinition ()
 
- Public Member Functions inherited from LocalTaskInterface
 getTitle ()
 

Protected Member Functions

 routeProvider ()
 

Protected Attributes

 $routeProvider
 
 $active = FALSE
 
- Protected Attributes inherited from PluginBase
 $pluginId
 
 $pluginDefinition
 
 $configuration
 

Additional Inherited Members

- Data Fields inherited from PluginBase
const DERIVATIVE_SEPARATOR = ':'
 

Detailed Description

Default object used for LocalTaskPlugins.

Member Function Documentation

getActive ( )

{Gets the active status.

Returns
bool TRUE if the local task is active, FALSE otherwise.
See Also
::setActive()
}

Implements LocalTaskInterface.

getCacheContexts ( )

{The cache contexts associated with this object.These identify a specific variation/representation of the object.Cache contexts are tokens: placeholders that are converted to cache keys by the service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.

Returns
string[] An array of cache context tokens, used to generate a cache ID.
See Also
::convertTokensToKeys()
}

Implements CacheableDependencyInterface.

getCacheMaxAge ( )

{The maximum age for which this object may be cached.

Returns
int The maximum time in seconds that this object may be cached.
}

Implements CacheableDependencyInterface.

References Cache\PERMANENT.

getCacheTags ( )

{The cache tags associated with this object.When this object is modified, these cache tags will be invalidated.

Returns
string[] A set of cache tags.
}

Implements CacheableDependencyInterface.

getOptions ( RouteMatchInterface  $route_match)

{Returns options for rendering a link to the local task.

Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match.
Returns
array An associative array of options.
}

Implements LocalTaskInterface.

getRouteName ( )

{Get the route name from the settings.

Returns
string The name of the route this local task links to.
}

Implements LocalTaskInterface.

Referenced by LocalTaskDefault\getRouteParameters().

Here is the caller graph for this function:

getRouteParameters ( RouteMatchInterface  $route_match)

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

Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match.
Returns
array An array of parameter names and values.
}

Implements LocalTaskInterface.

References RouteMatchInterface\getRawParameter(), RouteMatchInterface\getRawParameters(), LocalTaskDefault\getRouteName(), and LocalTaskDefault\routeProvider().

Here is the call graph for this function:

getTitle ( Request  $request = NULL)

{}

getWeight ( )

Returns the weight of the local task.

Returns
int The weight of the task. If not defined in the annotation returns 0 by default or -10 for the root tab.

Implements LocalTaskInterface.

routeProvider ( )
protected

Returns the route provider.

Returns
The route provider.

References Drupal\service().

Referenced by LocalTaskDefault\getRouteParameters().

Here is the call graph for this function:

Here is the caller graph for this function:

setActive (   $active = TRUE)

{Sets the active status.

Parameters
bool$activeSets whether this tab is active (e.g. a parent of the current tab).
Returns
The called object for chaining.
}

Implements LocalTaskInterface.


The documentation for this class was generated from the following file: