Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     $this->entity->delete();
     drupal_set_message(t('The custom name format %label has been deleted.', array('%label' => $this->entity->label())));
     $form_state->setRedirectUrl($this->getCancelUrl());
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     $this->entity->delete();
     drupal_set_message($this->t('The @label mega menu has been removed.', ['@label' => $this->entity->label()]));
     $form_state->setRedirectUrl($this->getCancelUrl());
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitForm($form, $form_state);
     $this->termStorage->resetWeights($this->entity->id());
     drupal_set_message($this->t('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label())));
     $this->logger('taxonomy')->notice('Reset vocabulary %name to alphabetical order.', array('%name' => $this->entity->label()));
     $form_state->setRedirectUrl($this->getCancelUrl());
 }