public function ShippingInformation::buildConfigurationSummary in Commerce Shipping 8.2
Builds a summary of the pane configuration.
Complements the methods provided by PluginFormInterface, allowing the checkout flow form to provide a summary of pane configuration.
Return value
string An HTML summary of the pane configuration.
Overrides CheckoutPaneBase::buildConfigurationSummary
File
- src/
Plugin/ Commerce/ CheckoutPane/ ShippingInformation.php, line 127
Class
- ShippingInformation
- Provides the shipping information pane.
Namespace
Drupal\commerce_shipping\Plugin\Commerce\CheckoutPaneCode
public function buildConfigurationSummary() {
if (!empty($this->configuration['require_shipping_profile'])) {
$summary = $this
->t('Hide shipping costs until an address is entered: Yes') . '<br>';
}
else {
$summary = $this
->t('Hide shipping costs until an address is entered: No') . '<br>';
}
if (!empty($this->configuration['auto_recalculate'])) {
$summary .= $this
->t('Autorecalculate: Yes');
}
else {
$summary .= $this
->t('Autorecalculate: No');
}
return $summary;
}