You are here

public static function Remote::settings in FileField Sources 8

Implements hook_filefield_source_settings().

File

src/Plugin/FilefieldSource/Remote.php, line 388

Class

Remote
A FileField source plugin to allow downloading a file from a remote server.

Namespace

Drupal\filefield_sources\Plugin\FilefieldSource

Code

public static function settings(WidgetInterface $plugin) {
  $return = [];

  // Add settings to the FileField widget form.
  if (!filefield_sources_curl_enabled()) {
    \Drupal::messenger()
      ->addError(t('<strong>Filefield sources:</strong> remote plugin will be disabled without php-curl extension.'), 'warning');
  }
  return $return;
}