You are here

public function GroupLeaveForm::getQuestion in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Form/GroupLeaveForm.php \Drupal\group\Form\GroupLeaveForm::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 GroupContentDeleteForm::getQuestion

File

src/Form/GroupLeaveForm.php, line 15

Class

GroupLeaveForm
Provides a form for leaving a group.

Namespace

Drupal\group\Form

Code

public function getQuestion() {
  $message = 'Are you sure you want to leave %group?';
  $replace = [
    '%group' => $this
      ->getEntity()
      ->getGroup()
      ->label(),
  ];
  return $this
    ->t($message, $replace);
}