You are here

public function ManagerForm::removeField in Hashtags 8

File

src/Form/ManagerForm.php, line 126

Class

ManagerForm

Namespace

Drupal\hashtags\Form

Code

public function removeField(array &$form, FormStateInterface $form_state) {
  $clicked_button = $form_state
    ->getTriggeringElement();
  $entity_type = $clicked_button['#entity_type'];
  $bundle = $clicked_button['#bundle'];
  $form_state
    ->setRedirectUrl(new Url('hashtags.delete_form', [
    'entity_type' => $entity_type,
    'bundle' => $bundle,
  ]));
}