public function OverviewForm::submitForm in Linkit 8.4
Same name in this branch
- 8.4 src/Form/Attribute/OverviewForm.php \Drupal\linkit\Form\Attribute\OverviewForm::submitForm()
- 8.4 src/Form/Matcher/OverviewForm.php \Drupal\linkit\Form\Matcher\OverviewForm::submitForm()
Same name and namespace in other branches
- 8.5 src/Form/Matcher/OverviewForm.php \Drupal\linkit\Form\Matcher\OverviewForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ Matcher/ OverviewForm.php, line 156 - Contains \Drupal\linkit\Form\Matcher\OverviewForm.
Class
- OverviewForm
- Provides an overview form for matchers on a profile.
Namespace
Drupal\linkit\Form\MatcherCode
public function submitForm(array &$form, FormStateInterface $form_state) {
foreach ($form_state
->getValue('plugins') as $id => $plugin_data) {
if ($this->linkitProfile
->getMatchers()
->has($id)) {
$this->linkitProfile
->getMatcher($id)
->setWeight($plugin_data['weight']);
}
}
$this->linkitProfile
->save();
}