You are here

public function VideoUploadWidget::settingsSummary in Video 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldWidget/VideoUploadWidget.php \Drupal\video\Plugin\Field\FieldWidget\VideoUploadWidget::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/VideoUploadWidget.php, line 150

Class

VideoUploadWidget
Plugin implementation of the 'video_upload' widget.

Namespace

Drupal\video\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = [];
  $summary[] = t('Progress indicator: @progress_indicator<br/>Extensions : @file_extensions<br/>File directory : @file_directory<br/>@max_filesize', [
    '@progress_indicator' => $this
      ->getSetting('progress_indicator'),
    '@file_extensions' => $this
      ->getSetting('file_extensions'),
    '@file_directory' => $this
      ->getSetting('uri_scheme') . '://' . $this
      ->getSetting('file_directory'),
    '@max_filesize' => $this
      ->getSetting('max_filesize') ? 'Max filesize: ' . $this
      ->getSetting('max_filesize') : '',
  ]);
  return $summary;
}