public function ContactSubscription::buildConfigurationSummary in Mailchimp E-Commerce 8
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
- modules/
mailchimp_ecommerce_commerce/ src/ Plugin/ Commerce/ CheckoutPane/ ContactSubscription.php, line 37
Class
- ContactSubscription
- Provides the subscription information pane.
Namespace
Drupal\mailchimp_ecommerce_commerce\Plugin\Commerce\CheckoutPaneCode
public function buildConfigurationSummary() {
$summary = '';
if (!empty($this->configuration['label'])) {
$summary .= $this
->t('Label: @text', [
'@text' => $this->configuration['label'],
]) . '<br/>';
}
if (isset($this->configuration['review'])) {
$text = $this->configuration['review'] == 1 ? $this
->t('Yes') : $this
->t('No');
$summary .= $this
->t('Display in review step: @text', [
'@text' => $text,
]) . '<br/>';
}
if (!empty($this->configuration['review_label'])) {
$summary .= $this
->t('Review label: @text', [
'@text' => $this->configuration['review_label'],
]) . '<br/>';
}
if (!empty($this->configuration['review_label_on'])) {
$summary .= $this
->t('Review label on: @text', [
'@text' => $this->configuration['review_label_on'],
]) . '<br/>';
}
if (!empty($this->configuration['review_label_off'])) {
$summary .= $this
->t('Review label off: @text', [
'@text' => $this->configuration['review_label_off'],
]) . '<br/>';
}
return $summary;
}