public function FileWidgetMultiple::preprocess in Open Social 8.5
Same name and namespace in other branches
- 8.9 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.2 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.3 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.4 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.6 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.7 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
- 8.8 themes/socialbase/src/Plugin/Preprocess/FileWidgetMultiple.php \Drupal\socialbase\Plugin\Preprocess\FileWidgetMultiple::preprocess()
Preprocess theme hook variables.
Parameters
array $variables: The variables array, passed by reference (modify in place).
string $hook: The name of the theme hook.
array $info: The theme hook info array.
Overrides PreprocessBase::preprocess
File
- themes/
socialbase/ src/ Plugin/ Preprocess/ FileWidgetMultiple.php, line 19
Class
- FileWidgetMultiple
- Pre-processes variables for the "file_widget_multiple" theme hook.
Namespace
Drupal\socialbase\Plugin\PreprocessCode
public function preprocess(array &$variables, $hook, array $info) {
parent::preprocess($variables, $hook, $info);
// Remove duplicated ajax wrapper for topic/events files field,
// because one is already rendered in container.html.twig.
if (!empty($variables['element']['#id']) && strpos($variables['element']['#id'], 'edit-field-files') !== FALSE) {
unset($variables['element']['#prefix']);
unset($variables['element']['#suffix']);
}
}