public function Measurement::getSummary in Commerce Feeds 8
Returns the summary for a target.
Returning the summary as array is encouraged. The allowance of returning a string only exists for backwards compatibility.
Return value
string|string[] The configuration summary.
Overrides FieldTargetBase::getSummary
File
- src/
Feeds/ Target/ Measurement.php, line 72
Class
- Measurement
- Defines a physical_measurement field mapper.
Namespace
Drupal\commerce_feeds\Feeds\TargetCode
public function getSummary() {
return [
'measurement_type' => [
'#type' => 'item',
'#markup' => $this
->t('Measurement type: @type', [
'@type' => MeasurementType::getLabels()[$this->settings['measurement_type']],
]),
],
'unit' => [
'#type' => 'item',
'#markup' => $this
->t('Unit: %unit', [
'%unit' => $this->configuration['unit'],
]),
],
];
}