3 namespace Drupal\Core\Form;
6 * Defines the behavior a confirmation form.
8 interface ConfirmFormInterface extends FormInterface {
11 * Returns the question to ask the user.
13 * @return \Drupal\Core\StringTranslation\TranslatableMarkup
14 * The form question. The page title will be set to this value.
16 public function getQuestion();
19 * Returns the route to go to if the user cancels the action.
21 * @return \Drupal\Core\Url
24 public function getCancelUrl();
27 * Returns additional text to display as a description.
29 * @return \Drupal\Core\StringTranslation\TranslatableMarkup
30 * The form description.
32 public function getDescription();
35 * Returns a caption for the button that confirms the action.
37 * @return \Drupal\Core\StringTranslation\TranslatableMarkup
38 * The form confirmation text.
40 public function getConfirmText();
43 * Returns a caption for the link which cancels the action.
45 * @return \Drupal\Core\StringTranslation\TranslatableMarkup
46 * The form cancellation text.
48 public function getCancelText();
51 * Returns the internal name used to refer to the confirmation item.
54 * The internal form name.
56 public function getFormName();