class HackedProjectConverter in Hacked! 8.2
Parameter converter for upcasting entity ids to full objects.
Hierarchy
- class \Drupal\hacked\ParamConverter\HackedProjectConverter implements ParamConverterInterface
Expanded class hierarchy of HackedProjectConverter
1 string reference to 'HackedProjectConverter'
1 service uses HackedProjectConverter
File
- src/
ParamConverter/ HackedProjectConverter.php, line 12
Namespace
Drupal\hacked\ParamConverterView source
class HackedProjectConverter implements ParamConverterInterface {
/**
* {@inheritdoc}
*/
public function convert($value, $definition, $name, array $defaults) {
return new hackedProject($value);
}
/**
* {@inheritdoc}
*/
public function applies($definition, $name, Route $route) {
return !empty($definition['type']) && $definition['type'] === 'hacked_project';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HackedProjectConverter:: |
public | function |
Determines if the converter applies to a specific route and variable. Overrides ParamConverterInterface:: |
|
HackedProjectConverter:: |
public | function |
Converts path variables to their corresponding objects. Overrides ParamConverterInterface:: |