You are here

public static function N1edFileField::preRenderWidget in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

Pre-renders widget form.

File

src/N1edFileField.php, line 118

Class

N1edFileField

Namespace

Drupal\n1ed

Code

public static function preRenderWidget($element) {

  // Hide elements if there is already an uploaded file.
  if (!empty($element['#value']['fids'])) {
    $element['n1ed_paths']['#access'] = false;
  }
  return $element;
}