public static function Reference::element in FileField Sources 8
Theme the output of the reference element.
File
- src/
Plugin/ FilefieldSource/ Reference.php, line 119
Class
- Reference
- A FileField source plugin to allow referencing of existing files.
Namespace
Drupal\filefield_sources\Plugin\FilefieldSourceCode
public static function element($variables) {
$element = $variables['element'];
$element['autocomplete']['#field_suffix'] = \Drupal::service('renderer')
->render($element['select']);
return '<div class="filefield-source filefield-source-reference clear-block">' . \Drupal::service('renderer')
->render($element['autocomplete']) . '</div>';
}