You are here

KeyConfigOverrideDeleteForm.php in Key 8

Namespace

Drupal\key\Form

File

src/Form/KeyConfigOverrideDeleteForm.php
View source
<?php

namespace Drupal\key\Form;

use Drupal\Core\Entity\EntityDeleteForm;
use Drupal\Core\Url;

/**
 * Builds the form to delete a Key.
 */
class KeyConfigOverrideDeleteForm extends EntityDeleteForm {

  /**
   * {@inheritdoc}
   */
  public function getQuestion() {
    return $this
      ->t('Are you sure you want to delete the override %name?', [
      '%name' => $this->entity
        ->label(),
    ]);
  }

  /**
   * {@inheritdoc}
   */
  public function getCancelUrl() {
    return new Url('entity.key_config_override.collection');
  }

  /**
   * {@inheritdoc}
   */
  public function getConfirmText() {
    return $this
      ->t('Delete');
  }

  /**
   * {@inheritdoc}
   */
  public function getDeletionMessage() {
    return $this
      ->t('The override %name has been deleted.', [
      '%name' => $this->entity
        ->label(),
    ]);
  }

}

Classes

Namesort descending Description
KeyConfigOverrideDeleteForm Builds the form to delete a Key.