public function MailchimpListsFieldSubscribeFormatter::settingsSummary in Mailchimp 8
Same name and namespace in other branches
- 2.x modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsFieldSubscribeFormatter.php \Drupal\mailchimp_lists\Plugin\Field\FieldFormatter\MailchimpListsFieldSubscribeFormatter::settingsSummary()
Returns a short summary for the current formatter settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.
Return value
string[] A short summary of the formatter settings.
Overrides FormatterBase::settingsSummary
File
- modules/
mailchimp_lists/ src/ Plugin/ Field/ FieldFormatter/ MailchimpListsFieldSubscribeFormatter.php, line 92
Class
- MailchimpListsFieldSubscribeFormatter
- Plugin implementation of the 'mailchimp_lists_field_subscribe' formatter.
Namespace
Drupal\mailchimp_lists\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$field_settings = $this
->getFieldSettings();
$settings = $this
->getSettings();
$summary = [];
if ($field_settings['show_interest_groups'] && $settings['show_interest_groups']) {
$summary[] = $this
->t('Display Interest Groups');
}
else {
$summary[] = $this
->t('Hide Interest Groups');
}
return $summary;
}