public static function DirectoryBrowser::processCheckbox in Media Directories 3.x
Same name and namespace in other branches
- 8 modules/media_directories_ui/src/Plugin/EntityBrowser/Widget/DirectoryBrowser.php \Drupal\media_directories_ui\Plugin\EntityBrowser\Widget\DirectoryBrowser::processCheckbox()
- 2.x modules/media_directories_ui/src/Plugin/EntityBrowser/Widget/DirectoryBrowser.php \Drupal\media_directories_ui\Plugin\EntityBrowser\Widget\DirectoryBrowser::processCheckbox()
Sets the #checked property when rebuilding form.
Every time when we rebuild we want all checkboxes to be unchecked.
See also
\Drupal\Core\Render\Element\Checkbox::processCheckbox()
File
- modules/
media_directories_ui/ src/ Plugin/ EntityBrowser/ Widget/ DirectoryBrowser.php, line 173
Class
- DirectoryBrowser
- Uses a view to provide entity listing in a browser's widget.
Namespace
Drupal\media_directories_ui\Plugin\EntityBrowser\WidgetCode
public static function processCheckbox(&$element, FormStateInterface $form_state, &$complete_form) {
if ($form_state
->isRebuilding()) {
$element['#checked'] = FALSE;
}
return $element;
}