public function AddToHeadParamConverter::convert in Add To Head 8
Converts path variables to their corresponding objects.
Parameters
mixed $value: The raw value.
mixed $definition: The parameter definition provided in the route options.
string $name: The name of the parameter.
array $defaults: The route defaults array.
Return value
mixed|null The converted parameter value.
Overrides ParamConverterInterface::convert
File
- src/
ParamConverter/ AddToHeadParamConverter.php, line 9
Class
Namespace
Drupal\add_to_head\ParamConverterCode
public function convert($value, $definition, $name, array $defaults) {
$settings = add_to_head_get_settings();
return array_key_exists($value, $settings) ? $settings[$value] : FALSE;
}