public function ClassSettingsForm::save in Feed Import 8
Form submission handler for the 'save' action.
Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved.
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
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
Overrides FeedImporterFormBase::save
File
- src/
Form/ ClassSettingsForm.php, line 119
Class
- ClassSettingsForm
- Form for editing various Feed Importer settings.
Namespace
Drupal\feed_import\FormCode
public function save(array $form, FormStateInterface $form_state) {
if (!$this->entity) {
return $form_state
->setRedirect('feed_import.admin');
}
// $values = &$form_state->getValue('settings');
// $values += $this->entity->getSettings();
// $this->entity->settings[$this->setting] = array(
// 'name' => $v['name'],
// 'class' => $v['class'],
// 'options' => $v['options'],
// );
parent::save($form, $form_state);
}