Same name in other branches
- 8.x-3.x src/Form/QuickTabsInstanceDeleteForm.php \Drupal\quicktabs\Form\QuickTabsInstanceDeleteForm
Class QuickTabsInstanceDeleteForm.
Hierarchy
- class \Drupal\quicktabs\Form\QuickTabsInstanceDeleteForm extends \Drupal\Core\Entity\EntityConfirmFormBase
Expanded class hierarchy of QuickTabsInstanceDeleteForm
File
-
src/
Form/ QuickTabsInstanceDeleteForm.php, line 12
Namespace
Drupal\quicktabs\FormView 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
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
QuickTabsInstanceDeleteForm::getCancelUrl | public | function | |
QuickTabsInstanceDeleteForm::getConfirmText | public | function | |
QuickTabsInstanceDeleteForm::getQuestion | public | function | |
QuickTabsInstanceDeleteForm::submitForm | public | function |