Class QuicktabAddForm

Hierarchy

  • class \Drupal\quicktabs\Form\QuicktabDeleteForm extends \Drupal\Core\Entity\EntityConfirmFormBase

Expanded class hierarchy of QuicktabDeleteForm

Fichier

src/Form/QuicktabDeleteForm.php, line 16

Namespace

Drupal\quicktabs\Form
View source
class QuicktabDeleteForm extends EntityConfirmFormBase {
    
    /**
     * {@inheritdoc}
     */
    public function getQuestion() {
        
        /**
         * @var \Drupal\quicktabs\Entity\QuickSet $entity
         */
        $entity = $this->entity;
        return $this->t('Are you sure you want to delete this quicktabs instance with name %name?', array(
            '%name' => $entity->getTitle(),
        ));
    }
    
    /**
     * {@inheritdoc}
     */
    public function getCancelUrl() {
        return new Url('quicktabs.list_tabs');
    }
    
    /**
     * {@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