public static function ImceFileField::preRenderWidget in IMCE 8
Same name and namespace in other branches
- 8.2 src/ImceFileField.php \Drupal\imce\ImceFileField::preRenderWidget()
Pre-renders widget form.
File
- src/
ImceFileField.php, line 84
Class
- ImceFileField
- Defines methods for integrating Imce into file field widgets.
Namespace
Drupal\imceCode
public static function preRenderWidget($element) {
// Hide elements if there is already an uploaded file.
if (!empty($element['#value']['fids'])) {
$element['imce_paths']['#access'] = FALSE;
}
return $element;
}