You are here

public static function Remote::routes in FileField Sources 8

Define routes for Remote source.

Return value

array Array of routes.

File

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

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 routes() {
  $routes = [];
  $routes['filefield_sources.remote'] = new Route('/file/remote/progress/{entity_type}/{bundle_name}/{field_name}/{delta}', [
    '_controller' => get_called_class() . '::progress',
  ], [
    '_access' => 'TRUE',
  ]);
  return $routes;
}