You are here

public function Checkboxes::prepare in YAML Form 8

Prepare an element to be rendered within a form.

Parameters

array $element: An element.

\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: A form submission.

Overrides OptionsBase::prepare

1 call to Checkboxes::prepare()
YamlFormCheckboxesOther::prepare in src/Plugin/YamlFormElement/YamlFormCheckboxesOther.php
Prepare an element to be rendered within a form.
1 method overrides Checkboxes::prepare()
YamlFormCheckboxesOther::prepare in src/Plugin/YamlFormElement/YamlFormCheckboxesOther.php
Prepare an element to be rendered within a form.

File

src/Plugin/YamlFormElement/Checkboxes.php, line 33

Class

Checkboxes
Provides a 'checkboxes' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function prepare(array &$element, YamlFormSubmissionInterface $yamlform_submission) {
  parent::prepare($element, $yamlform_submission);
  $element['#element_validate'][] = [
    get_class($this),
    'validateMultipleOptions',
  ];
}