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\FormView 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
Titre Trier par ordre décroissant | Modifiers | Object type | Résumé |
---|---|---|---|
QuicktabDeleteForm::getCancelUrl | public | function | |
QuicktabDeleteForm::getConfirmText | public | function | |
QuicktabDeleteForm::getQuestion | public | function | |
QuicktabDeleteForm::submitForm | public | function |