You are here

public function SamlauthMappingDeleteForm::getQuestion in SAML Authentication 4.x

Same name and namespace in other branches
  1. 8.3 modules/samlauth_user_fields/src/Form/SamlauthMappingDeleteForm.php \Drupal\samlauth_user_fields\Form\SamlauthMappingDeleteForm::getQuestion()

Returns the question to ask the user.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form question. The page title will be set to this value.

Overrides ConfirmFormInterface::getQuestion

File

modules/samlauth_user_fields/src/Form/SamlauthMappingDeleteForm.php, line 96

Class

SamlauthMappingDeleteForm
Form for deleting a mapping.

Namespace

Drupal\samlauth_user_fields\Form

Code

public function getQuestion() {
  $fields = $this->entityFieldManager
    ->getFieldDefinitions('user', 'user');
  $field_name = $fields[$this->fieldName]
    ->getLabel();
  return $this
    ->t('Are you sure you want to delete the mapping for %attribute > %field?', [
    '%attribute' => $this->attributeName,
    '%field' => $field_name,
  ]);
}