public function GroupUnsubscribeConfirmForm::getQuestion in Organic groups 8
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 ContentEntityDeleteForm::getQuestion
File
- src/
Form/ GroupUnsubscribeConfirmForm.php, line 26
Class
- GroupUnsubscribeConfirmForm
- Provides a confirmation form for unsubscribing form a group.
Namespace
Drupal\og\FormCode
public function getQuestion() {
/** @var OgMembershipInterface $membership */
$membership = $this
->getEntity();
/** @var EntityInterface $group */
$group = $membership
->getGroup();
return $this
->t('Are you sure you want to unsubscribe from the group %label?', [
'%label' => $group
->label(),
]);
}