Same name in other branches
  1. 4.x src/Form/QuickTabsInstanceDeleteForm.php \Drupal\quicktabs\Form\QuickTabsInstanceDeleteForm

Class QuickTabsInstanceDeleteForm.

Hierarchy

Expanded class hierarchy of QuickTabsInstanceDeleteForm

Fichier

src/Form/QuickTabsInstanceDeleteForm.php, line 12

Namespace

Drupal\quicktabs\Form
View source
class QuickTabsInstanceDeleteForm extends EntityConfirmFormBase {
    
    /**
     * {@inheritdoc}
     */
    public function getQuestion() {
        $entity = $this->entity;
        return $this->t('Are you sure you want to delete this quicktabs instance with name %name?', [
            '%name' => $entity->getLabel(),
        ]);
    }
    
    /**
     * {@inheritdoc}
     */
    public function getCancelUrl() {
        return new Url('quicktabs.admin');
    }
    
    /**
     * {@inheritdoc}
     */
    public function getConfirmText() {
        return $this->t('Delete');
    }
    
    /**
     * {@inheritdoc}
     */
    public function submitForm(array &$form, FormStateInterface $form_state) {
        $this->entity
            ->delete();
        $form_state->setRedirectUrl($this->getCancelUrl());
    }

}

Members