public function DeleteForm::buildForm in Linkit 8.5
Same name and namespace in other branches
- 8.4 src/Form/Matcher/DeleteForm.php \Drupal\linkit\Form\Matcher\DeleteForm::buildForm()
Form constructor.
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 The form structure.
Overrides ConfirmFormBase::buildForm
File
- src/
Form/ Matcher/ DeleteForm.php, line 56
Class
- DeleteForm
- Provides a form to remove a matcher from a profile.
Namespace
Drupal\linkit\Form\MatcherCode
public function buildForm(array $form, FormStateInterface $form_state, ProfileInterface $linkit_profile = NULL, $plugin_instance_id = NULL) {
$this->linkitProfile = $linkit_profile;
if (!$this->linkitProfile
->getMatchers()
->has($plugin_instance_id)) {
throw new NotFoundHttpException();
}
$this->linkitMatcher = $this->linkitProfile
->getMatcher($plugin_instance_id);
return parent::buildForm($form, $form_state);
}