Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\contact;
|
Chris@0
|
4
|
Chris@0
|
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
|
Chris@0
|
6
|
Chris@0
|
7 /**
|
Chris@0
|
8 * Provides an interface defining a contact form entity.
|
Chris@0
|
9 */
|
Chris@0
|
10 interface ContactFormInterface extends ConfigEntityInterface {
|
Chris@0
|
11
|
Chris@0
|
12 /**
|
Chris@0
|
13 * Returns the message to be displayed to user.
|
Chris@0
|
14 *
|
Chris@0
|
15 * @return string
|
Chris@0
|
16 * A user message.
|
Chris@0
|
17 */
|
Chris@0
|
18 public function getMessage();
|
Chris@0
|
19
|
Chris@0
|
20 /**
|
Chris@0
|
21 * Returns list of recipient email addresses.
|
Chris@0
|
22 *
|
Chris@0
|
23 * @return array
|
Chris@0
|
24 * List of recipient email addresses.
|
Chris@0
|
25 */
|
Chris@0
|
26 public function getRecipients();
|
Chris@0
|
27
|
Chris@0
|
28 /**
|
Chris@0
|
29 * Returns the path for redirect.
|
Chris@0
|
30 *
|
Chris@0
|
31 * @return string
|
Chris@0
|
32 * The redirect path.
|
Chris@0
|
33 */
|
Chris@0
|
34 public function getRedirectPath();
|
Chris@0
|
35
|
Chris@0
|
36 /**
|
Chris@0
|
37 * Returns the url object for redirect path.
|
Chris@0
|
38 *
|
Chris@0
|
39 * Empty redirect property results a url object of front page.
|
Chris@0
|
40 *
|
Chris@0
|
41 * @return \Drupal\core\Url
|
Chris@0
|
42 * The redirect url object.
|
Chris@0
|
43 */
|
Chris@0
|
44 public function getRedirectUrl();
|
Chris@0
|
45
|
Chris@0
|
46 /**
|
Chris@0
|
47 * Returns an auto-reply message to send to the message author.
|
Chris@0
|
48 *
|
Chris@0
|
49 * @return string
|
Chris@0
|
50 * An auto-reply message
|
Chris@0
|
51 */
|
Chris@0
|
52 public function getReply();
|
Chris@0
|
53
|
Chris@0
|
54 /**
|
Chris@0
|
55 * Returns the weight of this category (used for sorting).
|
Chris@0
|
56 *
|
Chris@0
|
57 * @return int
|
Chris@0
|
58 * The weight of this category.
|
Chris@0
|
59 */
|
Chris@0
|
60 public function getWeight();
|
Chris@0
|
61
|
Chris@0
|
62 /**
|
Chris@0
|
63 * Sets the message to be displayed to the user.
|
Chris@0
|
64 *
|
Chris@0
|
65 * @param string $message
|
Chris@0
|
66 * The message to display after form is submitted.
|
Chris@0
|
67 *
|
Chris@0
|
68 * @return $this
|
Chris@0
|
69 */
|
Chris@0
|
70 public function setMessage($message);
|
Chris@0
|
71
|
Chris@0
|
72 /**
|
Chris@0
|
73 * Sets list of recipient email addresses.
|
Chris@0
|
74 *
|
Chris@0
|
75 * @param array $recipients
|
Chris@0
|
76 * The desired list of email addresses of this category.
|
Chris@0
|
77 *
|
Chris@0
|
78 * @return $this
|
Chris@0
|
79 */
|
Chris@0
|
80 public function setRecipients($recipients);
|
Chris@0
|
81
|
Chris@0
|
82 /**
|
Chris@0
|
83 * Sets the redirect path.
|
Chris@0
|
84 *
|
Chris@0
|
85 * @param string $redirect
|
Chris@0
|
86 * The desired path.
|
Chris@0
|
87 *
|
Chris@0
|
88 * @return $this
|
Chris@0
|
89 */
|
Chris@0
|
90 public function setRedirectPath($redirect);
|
Chris@0
|
91
|
Chris@0
|
92 /**
|
Chris@0
|
93 * Sets an auto-reply message to send to the message author.
|
Chris@0
|
94 *
|
Chris@0
|
95 * @param string $reply
|
Chris@0
|
96 * The desired reply.
|
Chris@0
|
97 *
|
Chris@0
|
98 * @return $this
|
Chris@0
|
99 */
|
Chris@0
|
100 public function setReply($reply);
|
Chris@0
|
101
|
Chris@0
|
102 /**
|
Chris@0
|
103 * Sets the weight.
|
Chris@0
|
104 *
|
Chris@0
|
105 * @param int $weight
|
Chris@0
|
106 * The desired weight.
|
Chris@0
|
107 *
|
Chris@0
|
108 * @return $this
|
Chris@0
|
109 */
|
Chris@0
|
110 public function setWeight($weight);
|
Chris@0
|
111
|
Chris@0
|
112 }
|