public static function View::processCheckbox in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Plugin/EntityBrowser/Widget/View.php \Drupal\entity_browser\Plugin\EntityBrowser\Widget\View::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
- src/
Plugin/ EntityBrowser/ Widget/ View.php, line 154
Class
- View
- Uses a view to provide entity listing in a browser's widget.
Namespace
Drupal\entity_browser\Plugin\EntityBrowser\WidgetCode
public static function processCheckbox(&$element, FormStateInterface $form_state, &$complete_form) {
if ($form_state
->isRebuilding()) {
$element['#checked'] = FALSE;
}
return $element;
}