3 namespace Drupal\contact;
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
8 * Provides an interface defining a contact form entity.
10 interface ContactFormInterface extends ConfigEntityInterface {
13 * Returns the message to be displayed to user.
18 public function getMessage();
21 * Returns list of recipient email addresses.
24 * List of recipient email addresses.
26 public function getRecipients();
29 * Returns the path for redirect.
34 public function getRedirectPath();
37 * Returns the url object for redirect path.
39 * Empty redirect property results a url object of front page.
41 * @return \Drupal\core\Url
42 * The redirect url object.
44 public function getRedirectUrl();
47 * Returns an auto-reply message to send to the message author.
50 * An auto-reply message
52 public function getReply();
55 * Returns the weight of this category (used for sorting).
58 * The weight of this category.
60 public function getWeight();
63 * Sets the message to be displayed to the user.
65 * @param string $message
66 * The message to display after form is submitted.
70 public function setMessage($message);
73 * Sets list of recipient email addresses.
75 * @param array $recipients
76 * The desired list of email addresses of this category.
80 public function setRecipients($recipients);
83 * Sets the redirect path.
85 * @param string $redirect
90 public function setRedirectPath($redirect);
93 * Sets an auto-reply message to send to the message author.
95 * @param string $reply
100 public function setReply($reply);
106 * The desired weight.
110 public function setWeight($weight);