bdfdafcc2ae735afc9d3463d88c201b53bd460c8
[yaffs-website] / web / core / lib / Drupal / Core / Form / ConfirmFormInterface.php
1 <?php
2
3 namespace Drupal\Core\Form;
4
5 /**
6  * Defines the behavior a confirmation form.
7  */
8 interface ConfirmFormInterface extends FormInterface {
9
10   /**
11    * Returns the question to ask the user.
12    *
13    * @return \Drupal\Core\StringTranslation\TranslatableMarkup
14    *   The form question. The page title will be set to this value.
15    */
16   public function getQuestion();
17
18   /**
19    * Returns the route to go to if the user cancels the action.
20    *
21    * @return \Drupal\Core\Url
22    *   A URL object.
23    */
24   public function getCancelUrl();
25
26   /**
27    * Returns additional text to display as a description.
28    *
29    * @return \Drupal\Core\StringTranslation\TranslatableMarkup
30    *   The form description.
31    */
32   public function getDescription();
33
34   /**
35    * Returns a caption for the button that confirms the action.
36    *
37    * @return \Drupal\Core\StringTranslation\TranslatableMarkup
38    *   The form confirmation text.
39    */
40   public function getConfirmText();
41
42   /**
43    * Returns a caption for the link which cancels the action.
44    *
45    * @return \Drupal\Core\StringTranslation\TranslatableMarkup
46    *   The form cancellation text.
47    */
48   public function getCancelText();
49
50   /**
51    * Returns the internal name used to refer to the confirmation item.
52    *
53    * @return string
54    *   The internal form name.
55    */
56   public function getFormName();
57
58 }