You are here

public function EntityDeleteFormTrait::getQuestion in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php \Drupal\Core\Entity\EntityDeleteFormTrait::getQuestion()
2 calls to EntityDeleteFormTrait::getQuestion()
ContentEntityDeleteForm::getQuestion in core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php
Returns the question to ask the user.
NodeTypeDeleteConfirm::buildForm in core/modules/node/src/Form/NodeTypeDeleteConfirm.php
Form constructor.
3 methods override EntityDeleteFormTrait::getQuestion()
DateFormatDeleteForm::getQuestion in core/modules/system/src/Form/DateFormatDeleteForm.php
ImageStyleDeleteForm::getQuestion in core/modules/image/src/Form/ImageStyleDeleteForm.php
VocabularyDeleteForm::getQuestion in core/modules/taxonomy/src/Form/VocabularyDeleteForm.php

File

core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php, line 51
Contains \Drupal\Core\Entity\EntityDeleteFormTrait.

Class

EntityDeleteFormTrait
Provides a trait for an entity deletion form.

Namespace

Drupal\Core\Entity

Code

public function getQuestion() {
  return $this
    ->t('Are you sure you want to delete the @entity-type %label?', array(
    '@entity-type' => $this
      ->getEntity()
      ->getEntityType()
      ->getLowercaseLabel(),
    '%label' => $this
      ->getEntity()
      ->label(),
  ));
}