You are here

public function YoastSeoWidget::settingsSummary in Real-time SEO for Drupal 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/YoastSeoWidget.php \Drupal\yoast_seo\Plugin\Field\FieldWidget\YoastSeoWidget::settingsSummary()

Returns a short summary for the current widget settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.

Return value

array A short summary of the widget settings.

Overrides WidgetBase::settingsSummary

File

src/Plugin/Field/FieldWidget/YoastSeoWidget.php, line 218

Class

YoastSeoWidget
Advanced widget for yoast_seo field.

Namespace

Drupal\yoast_seo\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  if ($this
    ->getSetting('edit_title')) {
    $summary[] = 'Title editing enabled';
  }
  if ($this
    ->getSetting('edit_description')) {
    $summary[] = 'Description editing enabled';
  }
  return $summary;
}