class ShipmentConverter in Ubercart 8.4
Provides upcasting for a node entity in preview.
Hierarchy
- class \Drupal\uc_fulfillment\ParamConverter\ShipmentConverter implements ParamConverterInterface
Expanded class hierarchy of ShipmentConverter
1 string reference to 'ShipmentConverter'
- uc_fulfillment.services.yml in shipping/
uc_fulfillment/ uc_fulfillment.services.yml - shipping/uc_fulfillment/uc_fulfillment.services.yml
1 service uses ShipmentConverter
- uc_shipment in shipping/
uc_fulfillment/ uc_fulfillment.services.yml - Drupal\uc_fulfillment\ParamConverter\ShipmentConverter
File
- shipping/
uc_fulfillment/ src/ ParamConverter/ ShipmentConverter.php, line 12
Namespace
Drupal\uc_fulfillment\ParamConverterView source
class ShipmentConverter implements ParamConverterInterface {
/**
* {@inheritdoc}
*/
public function convert($value, $definition, $name, array $defaults) {
return Shipment::load($value);
}
/**
* {@inheritdoc}
*/
public function applies($definition, $name, Route $route) {
return !empty($definition['type']) && $definition['type'] == 'uc_shipment';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ShipmentConverter:: |
public | function |
Determines if the converter applies to a specific route and variable. Overrides ParamConverterInterface:: |
|
ShipmentConverter:: |
public | function |
Converts path variables to their corresponding objects. Overrides ParamConverterInterface:: |