interface MessageInterface

You are here

  1. 8 core/vendor/guzzlehttp/guzzle/src/Message/MessageInterface.php MessageInterface
  2. 8 core/vendor/zendframework/zend-stdlib/Zend/Stdlib/MessageInterface.php MessageInterface
  3. 8 core/modules/contact/lib/Drupal/contact/MessageInterface.php MessageInterface

Provides an interface defining a contant message entity

Namespace

Drupal\contact

Implemented by

Hierarchy

Expanded class hierarchy of MessageInterface

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
AccessibleInterface::access public function Checks data value access.
AccessInterface::ALLOW constant Grant access.
AccessInterface::DENY constant Deny access.
AccessInterface::KILL constant Block access.
ComplexDataInterface::get public function Gets a property object.
ComplexDataInterface::getProperties public function Gets an array of property objects.
ComplexDataInterface::isEmpty public function Determines whether the data structure is empty.
ComplexDataInterface::onChange public function React to changes to a child property.
ComplexDataInterface::set public function Sets a property value.
ContentEntityInterface::baseFieldDefinitions public static function Provides base field definitions for an entity type.
ContentEntityInterface::bundleFieldDefinitions public static function Provides or alters field definitions for a specific bundle.
ContentEntityInterface::getFieldDefinition public function Gets the definition of a contained field.
ContentEntityInterface::getFieldDefinitions public function Gets an array of field definitions of all contained fields.
ContentEntityInterface::hasField public function Returns whether the entity has a field with the given name.
ContentEntityInterface::initTranslation public function Marks the translation identified by the given language code as existing.
ContentEntityInterface::toArray public function Returns an array of all field values. Overrides EntityInterface::toArray
EntityInterface::bundle public function Returns the bundle of the entity.
EntityInterface::createDuplicate public function Creates a duplicate of the entity.
EntityInterface::delete public function Deletes an entity permanently.
EntityInterface::enforceIsNew public function Enforces an entity to be new.
EntityInterface::getCacheTag public function The unique cache tag associated with this entity.
EntityInterface::getEntityType public function Returns the entity type definition.
EntityInterface::getEntityTypeId public function Returns the ID of the type of the entity.
EntityInterface::getListCacheTags public function The list cache tags associated with this entity.
EntityInterface::getOriginalId public function Returns the original ID.
EntityInterface::getSystemPath public function Returns the internal path for this entity.
EntityInterface::hasLinkTemplate public function Indicates if a link template exists for a given key.
EntityInterface::id public function Returns the identifier.
EntityInterface::isNew public function Returns whether the entity is new.
EntityInterface::label public function Returns the label of the entity.
EntityInterface::language public function Returns the language of the entity. Overrides TranslatableInterface::language
EntityInterface::postCreate public function Acts on an entity after it is created but before hooks are invoked.
EntityInterface::postDelete public static function Acts on deleted entities before the delete hook is invoked.
EntityInterface::postLoad public static function Acts on loaded entities.
EntityInterface::postSave public function Acts on a saved entity before the insert or update hook is invoked.
EntityInterface::preCreate public static function Changes the values of an entity before it is created.
EntityInterface::preDelete public static function Acts on entities before they are deleted and before hooks are invoked.
EntityInterface::preSave public function Acts on an entity before the presave hook is invoked.
EntityInterface::referencedEntities public function Returns a list of entities referenced by this entity.
EntityInterface::save public function Saves an entity permanently.
EntityInterface::setOriginalId public function Sets the original ID.
EntityInterface::uriRelationships public function Returns a list of URI relationships supported by this entity.
EntityInterface::url public function Returns the public URL for this entity.
EntityInterface::urlInfo public function Returns the URI elements of the entity.
EntityInterface::uuid public function Returns the entity UUID (Universally Unique Identifier).
MessageInterface::copySender public function Returns TRUE if a copy should be sent to the sender.
MessageInterface::getCategory public function Returns the category this contact message belongs to.
MessageInterface::getMessage public function Returns the message body.
MessageInterface::getPersonalRecipient public function Returns the user this message is being sent to.
MessageInterface::getSenderMail public function Returns the e-mail address of the sender.
MessageInterface::getSenderName public function Returns the name of the sender.
MessageInterface::getSubject public function Returns the message subject.
MessageInterface::isPersonal public function Returns TRUE if this is the personal contact form.
MessageInterface::setCopySender public function Sets if the sender should receive a copy of this e-mail or not.
MessageInterface::setMessage public function Sets the e-mail message to send.
MessageInterface::setSenderMail public function Sets the e-mail address of the sender.
MessageInterface::setSenderName public function Sets the name of the message sender.
MessageInterface::setSubject public function Sets the subject for the e-mail.
RevisionableInterface::getRevisionId public function Returns the revision identifier of the entity.
RevisionableInterface::isDefaultRevision public function Checks if this entity is the default revision.
RevisionableInterface::isNewRevision public function Returns whether a new revision should be created on save.
RevisionableInterface::preSaveRevision public function Acts on a revision before it gets saved.
RevisionableInterface::setNewRevision public function Enforces an entity to be saved as a new revision.
TranslatableInterface::addTranslation public function Adds a new translation to the translatable object.
TranslatableInterface::getTranslation public function Gets a translation of the data.
TranslatableInterface::getTranslationLanguages public function Returns the languages the data is translated to.
TranslatableInterface::getUntranslated public function Returns the translatable object referring to the original language.
TranslatableInterface::hasTranslation public function Returns TRUE there is a translation for the given language code.
TranslatableInterface::isTranslatable public function Returns the translation support status.
TranslatableInterface::removeTranslation public function Removes the translation identified by the given language code.
TypedDataInterface::applyDefaultValue public function Applies the default value.
TypedDataInterface::getConstraints public function Gets a list of validation constraints.
TypedDataInterface::getDataDefinition public function Gets the data definition.
TypedDataInterface::getName public function Returns the name of a property or item.
TypedDataInterface::getParent public function Returns the parent data structure; i.e. either complex data or a list.
TypedDataInterface::getPropertyPath public function Returns the property path of the data.
TypedDataInterface::getRoot public function Returns the root of the typed data tree.
TypedDataInterface::getString public function Returns a string representation of the data.
TypedDataInterface::getValue public function Gets the data value.
TypedDataInterface::setContext public function Sets the context of a property or item via a context aware parent.
TypedDataInterface::setValue public function Sets the data value.
TypedDataInterface::validate public function Validates the currently set data value.

File

core/modules/contact/lib/Drupal/contact/MessageInterface.php, line 15
Contains \Drupal\contact\Entity\MessageInterface.

View source
interface MessageInterface extends ContentEntityInterface {

  /**
   * Returns the category this contact message belongs to.
   *
   * @return \Drupal\contact\CategoryInterface
   *   The contact category entity.
   */
  public function getCategory();

  /**
   * Returns the name of the sender.
   *
   * @return string
   *   The name of the message sender.
   */
  public function getSenderName();

  /**
   * Sets the name of the message sender.
   *
   * @param string $sender_name
   *   The name of the message sender.
   */
  public function setSenderName($sender_name);

  /**
   * Returns the e-mail address of the sender.
   *
   * @return string
   *   The e-mail address of the message sender.
   */
  public function getSenderMail();

  /**
   * Sets the e-mail address of the sender.
   *
   * @param string $sender_mail
   *   The e-mail address of the message sender.
   */
  public function setSenderMail($sender_mail);

  /**
   * Returns the message subject.
   *
   * @return string
   *   The message subject.
   */
  public function getSubject();

  /**
   * Sets the subject for the e-mail.
   *
   * @param string $subject
   *   The message subject.
   */
  public function setSubject($subject);

  /**
   * Returns the message body.
   *
   * @return string
   *   The message body.
   */
  public function getMessage();

  /**
   * Sets the e-mail message to send.
   *
   * @param string $message
   *   The message body.
   */
  public function setMessage($message);

  /**
   * Returns TRUE if a copy should be sent to the sender.
   *
   * @return bool
   *   TRUE if a copy should be sent, FALSE if not.
   */
  public function copySender();

  /**
   * Sets if the sender should receive a copy of this e-mail or not.
   *
   * @param bool $inform
   *   TRUE if a copy should be sent, FALSE if not.
   */
  public function setCopySender($inform);

  /**
   * Returns TRUE if this is the personal contact form.
   *
   * @return bool
   *   TRUE if the message bundle is personal.
   */
  public function isPersonal();

  /**
   * Returns the user this message is being sent to.
   *
   * @return \Drupal\user\UserInterface
   *   The user entity of the recipent, NULL if this is not a personal message.
   */
  public function getPersonalRecipient();

}
1 file declares its use of MessageInterface
Message.php in core/modules/contact/lib/Drupal/contact/Entity/Message.php
Contains Drupal\contact\Entity\Message.