Drupal 8  8.0.2
LanguageConverter Class Reference
Inheritance diagram for LanguageConverter:

Public Member Functions

 __construct (LanguageManagerInterface $language_manager)
 
 convert ($value, $definition, $name, array $defaults)
 
 applies ($definition, $name, Route $route)
 

Protected Attributes

 $languageManager
 

Detailed Description

Converts parameters for upcasting entity IDs to full objects.

Constructor & Destructor Documentation

__construct ( LanguageManagerInterface  $language_manager)

Constructs a new LanguageConverter.

Parameters
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

References Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

applies (   $definition,
  $name,
Route  $route 
)

{Determines if the converter applies to a specific route and variable.

Parameters
mixed$definitionThe parameter definition provided in the route options.
string$nameThe name of the parameter.
\Symfony\Component\Routing\Route$routeThe route to consider attaching to.
Returns
bool TRUE if the converter applies to the passed route and parameter, FALSE otherwise.
}

Implements ParamConverterInterface.

convert (   $value,
  $definition,
  $name,
array  $defaults 
)

{Converts path variables to their corresponding objects.

Parameters
mixed$valueThe raw value.
mixed$definitionThe parameter definition provided in the route options.
string$nameThe name of the parameter.
array$defaultsThe route defaults array.
Returns
mixed|null The converted parameter value.
}

Implements ParamConverterInterface.

References Drupal\languageManager().

Here is the call graph for this function:


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