annotate core/modules/contact/src/MessageInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\contact;
Chris@0 4
Chris@0 5 use Drupal\Core\Entity\ContentEntityInterface;
Chris@0 6
Chris@0 7 /**
Chris@0 8 * Provides an interface defining a contact message entity.
Chris@0 9 */
Chris@0 10 interface MessageInterface extends ContentEntityInterface {
Chris@0 11
Chris@0 12 /**
Chris@0 13 * Returns the form this contact message belongs to.
Chris@0 14 *
Chris@0 15 * @return \Drupal\contact\ContactFormInterface
Chris@0 16 * The contact form entity.
Chris@0 17 */
Chris@0 18 public function getContactForm();
Chris@0 19
Chris@0 20 /**
Chris@0 21 * Returns the name of the sender.
Chris@0 22 *
Chris@0 23 * @return string
Chris@0 24 * The name of the message sender.
Chris@0 25 */
Chris@0 26 public function getSenderName();
Chris@0 27
Chris@0 28 /**
Chris@0 29 * Sets the name of the message sender.
Chris@0 30 *
Chris@0 31 * @param string $sender_name
Chris@0 32 * The name of the message sender.
Chris@0 33 */
Chris@0 34 public function setSenderName($sender_name);
Chris@0 35
Chris@0 36 /**
Chris@0 37 * Returns the email address of the sender.
Chris@0 38 *
Chris@0 39 * @return string
Chris@0 40 * The email address of the message sender.
Chris@0 41 */
Chris@0 42 public function getSenderMail();
Chris@0 43
Chris@0 44 /**
Chris@0 45 * Sets the email address of the sender.
Chris@0 46 *
Chris@0 47 * @param string $sender_mail
Chris@0 48 * The email address of the message sender.
Chris@0 49 */
Chris@0 50 public function setSenderMail($sender_mail);
Chris@0 51
Chris@0 52 /**
Chris@0 53 * Returns the message subject.
Chris@0 54 *
Chris@0 55 * @return string
Chris@0 56 * The message subject.
Chris@0 57 */
Chris@0 58 public function getSubject();
Chris@0 59
Chris@0 60 /**
Chris@0 61 * Sets the subject for the email.
Chris@0 62 *
Chris@0 63 * @param string $subject
Chris@0 64 * The message subject.
Chris@0 65 */
Chris@0 66 public function setSubject($subject);
Chris@0 67
Chris@0 68 /**
Chris@0 69 * Returns the message body.
Chris@0 70 *
Chris@0 71 * @return string
Chris@0 72 * The message body.
Chris@0 73 */
Chris@0 74 public function getMessage();
Chris@0 75
Chris@0 76 /**
Chris@0 77 * Sets the email message to send.
Chris@0 78 *
Chris@0 79 * @param string $message
Chris@0 80 * The message body.
Chris@0 81 */
Chris@0 82 public function setMessage($message);
Chris@0 83
Chris@0 84 /**
Chris@0 85 * Returns TRUE if a copy should be sent to the sender.
Chris@0 86 *
Chris@0 87 * @return bool
Chris@0 88 * TRUE if a copy should be sent, FALSE if not.
Chris@0 89 */
Chris@0 90 public function copySender();
Chris@0 91
Chris@0 92 /**
Chris@0 93 * Sets if the sender should receive a copy of this email or not.
Chris@0 94 *
Chris@0 95 * @param bool $inform
Chris@0 96 * TRUE if a copy should be sent, FALSE if not.
Chris@0 97 */
Chris@0 98 public function setCopySender($inform);
Chris@0 99
Chris@0 100 /**
Chris@0 101 * Returns TRUE if this is the personal contact form.
Chris@0 102 *
Chris@0 103 * @return bool
Chris@0 104 * TRUE if the message bundle is personal.
Chris@0 105 */
Chris@0 106 public function isPersonal();
Chris@0 107
Chris@0 108 /**
Chris@0 109 * Returns the user this message is being sent to.
Chris@0 110 *
Chris@0 111 * @return \Drupal\user\UserInterface
Chris@0 112 * The user entity of the recipient, NULL if this is not a personal message.
Chris@0 113 */
Chris@0 114 public function getPersonalRecipient();
Chris@0 115
Chris@0 116 }