public function DeleteForm::buildForm in Linkit 8.4
Same name in this branch
- 8.4 src/Form/Attribute/DeleteForm.php \Drupal\linkit\Form\Attribute\DeleteForm::buildForm()
 - 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/ Attribute/ DeleteForm.php, line 61  - Contains \Drupal\linkit\Form\Attribute\DeleteForm.
 
Class
- DeleteForm
 - Provides a form to remove an attribute from a profile.
 
Namespace
Drupal\linkit\Form\AttributeCode
public function buildForm(array $form, FormStateInterface $form_state, ProfileInterface $linkit_profile = NULL, $plugin_instance_id = NULL) {
  $this->linkitProfile = $linkit_profile;
  if (!$this->linkitProfile
    ->getAttributes()
    ->has($plugin_instance_id)) {
    throw new NotFoundHttpException();
  }
  $this->linkitAttribute = $this->linkitProfile
    ->getAttribute($plugin_instance_id);
  return parent::buildForm($form, $form_state);
}