protected function ClassSettingsForm::getClassOptions in Feed Import 8
Gets all form items for class options.
Parameters
array &$setting: Current setting.
array &$settings: All defined settings.
array &$default: Default options values.
Return value
array An array containing all form items
See also
_feed_import_generate_class_options_form()
1 call to ClassSettingsForm::getClassOptions()
- ClassSettingsForm::buildForm in src/
Form/ ClassSettingsForm.php - Form constructor.
File
- src/
Form/ ClassSettingsForm.php, line 190
Class
- ClassSettingsForm
- Form for editing various Feed Importer settings.
Namespace
Drupal\feed_import\FormCode
protected function getClassOptions(array &$setting, array &$settings, array &$default) {
$fields = isset($setting['inherit_options']) && isset($settings[$setting['inherit_options']]) ? $this
->generateClassOptionsForm($setting, $settings[$setting['inherit_options']], $settings) : $setting['options'];
foreach ($default as $opt => &$v) {
if (isset($fields[$opt])) {
$fields[$opt]['#default_value'] = $v;
}
else {
unset($default[$opt]);
}
}
return $fields;
}