public static function SocialPostAlbumManagedFile::processManagedFile in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php \Drupal\social_post_album\Element\SocialPostAlbumManagedFile::processManagedFile()
- 10.0.x modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php \Drupal\social_post_album\Element\SocialPostAlbumManagedFile::processManagedFile()
- 10.1.x modules/social_features/social_post/modules/social_post_album/src/Element/SocialPostAlbumManagedFile.php \Drupal\social_post_album\Element\SocialPostAlbumManagedFile::processManagedFile()
Render API callback: Expands the managed_file element type.
Expands the file type to include Upload and Remove buttons, as well as support for a default value.
Overrides ManagedFile::processManagedFile
File
- modules/
social_features/ social_post/ modules/ social_post_album/ src/ Element/ SocialPostAlbumManagedFile.php, line 39
Class
- SocialPostAlbumManagedFile
- Provides an AJAX/progress aware widget for uploading and saving a file.
Namespace
Drupal\social_post_album\ElementCode
public static function processManagedFile(&$element, FormStateInterface $form_state, &$complete_form) {
if (!empty($element['#value']['fids'])) {
$complete_form[$element['#field_name']]['#attributes']['class'][] = self::CLASS_NAME;
}
return parent::processManagedFile($element, $form_state, $complete_form);
}