checkboxes.html.twig

Default theme implementation for a 'checkboxes' #type form element. Available variables attributes: A list of HTML attributes for the wrapper element. children: The rendered checkboxes. See also template_preprocess_checkboxes() File core/modules/system/templates/checkboxes.html.twig Related topics Theme system overview Functions and templates for the user interface that themes can override.

Checkboxes::getCheckedCheckboxes

public static Checkboxes::getCheckedCheckboxes(array $input) Determines which checkboxes were checked when a form is submitted. Parameters array $input: An array returned by the FormAPI for a set of checkboxes. Return value array An array of keys that were checked. File core/lib/Drupal/Core/Render/Element/Checkboxes.php, line 134 Class Checkboxes Provides a form element for a set of checkboxes. Namespace Drupal\Core\Render\Element Code public static function getCheckedCheckboxes(arra

Checkboxes::getInfo

public Checkboxes::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Checkboxes.php, line 38 Class Checkboxes Provides a form element for a set of checkboxes. Namespace Drupal\Core\Render\Element Co

Checkboxes

Provides a form element for a set of checkboxes. Properties: #options: An associative array whose keys are the values returned for each checkbox, and whose values are the labels next to each checkbox. The #options array cannot have a 0 key, as it would not be possible to discern checked and unchecked states. Usage example: $form['high_school']['tests_taken'] = array( '#type' => 'checkboxes', '#options' => array('SAT' => $this->t('SAT'), 'ACT' => $this->t('ACT')), '#ti

Checkbox::valueCallback

public static Checkbox::valueCallback(&$element, $input, FormStateInterface $form_state) Determines how user input is mapped to an element's #value property. Parameters array $element: An associative array containing the properties of the element. mixed $input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value mixed The value to ass

Checkbox::getInfo

public Checkbox::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Checkbox.php, line 31 Class Checkbox Provides a form element for a single checkbox. Namespace Drupal\Core\Render\Element Code publi

Checkbox::preRenderCheckbox

public static Checkbox::preRenderCheckbox($element) Prepares a #type 'checkbox' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #title, #value, #return_value, #description, #required, #attributes, #checked. Return value array The $element with prepared variables ready for input.html.twig. File core/lib/Drupal/Core/Render/Element/Checkbox.php, line 94 Class Checkbox Provides a form element for a

Checkbox::processCheckbox

public static Checkbox::processCheckbox(&$element, FormStateInterface $form_state, &$complete_form) Sets the #checked property of a checkbox element. File core/lib/Drupal/Core/Render/Element/Checkbox.php, line 110 Class Checkbox Provides a form element for a single checkbox. Namespace Drupal\Core\Render\Element Code public static function processCheckbox(&$element, FormStateInterface $form_state, &$complete_form) { $value = $element['#value']; $return_value = $eleme

Checkbox

Provides a form element for a single checkbox. Properties: #return_value: The value to return when the checkbox is checked. Usage example: $form['copy'] = array( '#type' => 'checkbox', '#title' => $this->t('Send me a copy'), ); Plugin annotation @FormElement("checkbox") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTr

ChangedFieldItemList::defaultAccess

public ChangedFieldItemList::defaultAccess($operation = 'view', AccountInterface $account = NULL) Contains the default access logic of this field. See \Drupal\Core\Entity\EntityAccessControlHandlerInterface::fieldAccess() for the parameter documentation. Return value \Drupal\Core\Access\AccessResultInterface The access result. Overrides FieldItemList::defaultAccess File core/lib/Drupal/Core/Field/ChangedFieldItemList.php, line 16 Class ChangedFieldItemList Defines a item list class for ch