public function WebformCompositeBase::getConfigurationFormProperties in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformCompositeBase.php \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::getConfigurationFormProperties()
Get an associative array of element properties from configuration webform.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array An associative array of element properties.
Overrides WebformElementBase::getConfigurationFormProperties
File
- src/
Plugin/ WebformElement/ WebformCompositeBase.php, line 1214
Class
- WebformCompositeBase
- Provides a base for composite elements.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getConfigurationFormProperties(array &$form, FormStateInterface $form_state) {
$properties = parent::getConfigurationFormProperties($form, $form_state);
foreach ($properties as $key => $value) {
// Convert composite element access and required to boolean value.
if (preg_match('/__(access|required)$/', $key)) {
$properties[$key] = (bool) $value;
}
}
return $properties;
}