You are here

protected function ComponentSectionForm::XelementBoolean in Module Builder 8.3

Set form element properties specific to boolean component properties.

Parameters

&$element: The form element for the component property.

FormStateInterface $form_state: The form state.

$property_info: The info array for the component property.

$form_default_value: The default value for the form element.

Return value

string The handling type to be applied to this element's value on submit.

File

src/Form/ComponentSectionForm.php, line 1334

Class

ComponentSectionForm
Generic form for entering a section of data for a component.

Namespace

Drupal\module_builder\Form

Code

protected function XelementBoolean(&$element, FormStateInterface $form_state, $property_info, $form_default_value) {
  $element['#type'] = 'checkbox';
  $element['#default_value'] = $form_default_value;
  return 'checkbox';
}