public function AnalyticsFormatter::settingsSummary in Facebook Instant Articles 8.2
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldFormatter/AnalyticsFormatter.php \Drupal\fb_instant_articles\Plugin\Field\FieldFormatter\AnalyticsFormatter::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
1 method overrides AnalyticsFormatter::settingsSummary()
- AnalyticsLinkFormatter::settingsSummary in src/
Plugin/ Field/ FieldFormatter/ AnalyticsLinkFormatter.php - Returns a short summary for the current formatter settings.
File
- src/
Plugin/ Field/ FieldFormatter/ AnalyticsFormatter.php, line 55
Class
- AnalyticsFormatter
- Plugin implementation of the 'fbia_analytics' formatter.
Namespace
Drupal\fb_instant_articles\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = [];
if ($source_type = $this
->getSetting('source_type')) {
$summary[] = $source_type === self::SOURCE_TYPE_URL ? $this
->t('URL') : $this
->t('Embedded HTML');
}
return $summary;
}