public static function Remote::element in FileField Sources 8
Theme the output of the remote element.
File
- src/
Plugin/ FilefieldSource/ Remote.php, line 336
Class
- Remote
- A FileField source plugin to allow downloading a file from a remote server.
Namespace
Drupal\filefield_sources\Plugin\FilefieldSourceCode
public static function element($variables) {
$element = $variables['element'];
$element['url']['#field_suffix'] = \Drupal::service('renderer')
->render($element['transfer']);
return '<div class="filefield-source filefield-source-remote clear-block">' . \Drupal::service('renderer')
->render($element['url']) . '</div>';
}