Same name and namespace in other branches
  1. 8.x-3.x src/Form/QuickTabsInstanceDeleteForm.php \Drupal\quicktabs\Form\QuickTabsInstanceDeleteForm 1 comment

Class QuickTabsInstanceDeleteForm.

Hierarchy

Expanded class hierarchy of QuickTabsInstanceDeleteForm

File

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