You are here

public function VideoEmbedWidget::settingsSummary in Video 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/VideoEmbedWidget.php \Drupal\video\Plugin\Field\FieldWidget\VideoEmbedWidget::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 FileWidget::settingsSummary

File

src/Plugin/Field/FieldWidget/VideoEmbedWidget.php, line 102

Class

VideoEmbedWidget
Plugin implementation of the 'video_embed' widget.

Namespace

Drupal\video\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = t('Providers : @allowed_providers<br/>Thumbnail directory : @file_directory', [
    '@allowed_providers' => implode(', ', array_filter($this
      ->getSetting('allowed_providers'))),
    '@file_directory' => $this
      ->getSetting('uri_scheme') . '://' . $this
      ->getSetting('file_directory'),
  ]);
  return $summary;
}