protected function SecKitSettingsForm::buildAttributeList in Security Kit 8
Same name and namespace in other branches
- 2.x src/Form/SecKitSettingsForm.php \Drupal\seckit\Form\SecKitSettingsForm::buildAttributeList()
Build the configuration form value list.
1 call to SecKitSettingsForm::buildAttributeList()
- SecKitSettingsForm::submitForm in src/
Form/ SecKitSettingsForm.php - Form submission handler.
File
- src/
Form/ SecKitSettingsForm.php, line 815
Class
- SecKitSettingsForm
- Implements a form to collect security check configuration.
Namespace
Drupal\seckit\FormCode
protected function buildAttributeList(array &$list = [], array $rawAttributes = [], $currentName = '') {
foreach ($rawAttributes as $key => $rawAttribute) {
$name = $currentName ? $currentName . '.' . $key : $key;
if (in_array($name, [
'op',
'form_id',
'form_token',
'form_build_id',
'submit',
])) {
continue;
}
if (is_array($rawAttribute)) {
$this
->buildAttributeList($list, $rawAttribute, $name);
}
else {
$list[$name] = $rawAttribute;
}
}
}