function Checkboxes::detectEmptyCheckboxes

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Render/Element/Checkboxes.php \Drupal\Core\Render\Element\Checkboxes::detectEmptyCheckboxes()
  2. 10 core/lib/Drupal/Core/Render/Element/Checkboxes.php \Drupal\Core\Render\Element\Checkboxes::detectEmptyCheckboxes()
  3. 11.x core/lib/Drupal/Core/Render/Element/Checkboxes.php \Drupal\Core\Render\Element\Checkboxes::detectEmptyCheckboxes()

Determines if all checkboxes in a set are unchecked.

Parameters

array $input: An array returned by the FormAPI for a set of checkboxes.

Return value

bool TRUE if all options are unchecked. FALSE otherwise.

1 call to Checkboxes::detectEmptyCheckboxes()
FilterPluginBase::acceptExposedInput in core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
Determines if the input from a filter should change the generated query.

File

core/lib/Drupal/Core/Render/Element/Checkboxes.php, line 181

Class

Checkboxes
Provides a form element for a set of checkboxes.

Namespace

Drupal\Core\Render\Element

Code

public static function detectEmptyCheckboxes(array $input) {
    return empty(static::getCheckedCheckboxes($input));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.