You are here

interface SimplenewsSourceInterface in Simplenews 7.2

Same name and namespace in other branches
  1. 7 includes/simplenews.source.inc \SimplenewsSourceInterface

The source used to build a newsletter mail.

Hierarchy

Expanded class hierarchy of SimplenewsSourceInterface

All classes that implement SimplenewsSourceInterface

Related topics

File

includes/simplenews.source.inc, line 13
Contains SimplenewsSource interface and implementations.

View source
interface SimplenewsSourceInterface {

  /**
   * Returns the mail headers.
   *
   * @param $headers
   *   The default mail headers.
   *
   * @return
   *   Mail headers as an array.
   */
  function getHeaders(array $headers);

  /**
   * Returns the mail subject.
   */
  function getSubject();

  /**
   * Returns the mail body.
   *
   * The body should either be plaintext or html, depending on the format.
   */
  function getBody();

  /**
   * Returns the plaintext body.
   */
  function getPlainBody();

  /**
   * Returns the mail footer.
   *
   * The footer should either be plaintext or html, depending on the format.
   */
  function getFooter();

  /**
   * Returns the plain footer.
   */
  function getPlainFooter();

  /**
   * Returns the mail format.
   *
   * @return
   *   The mail format as string, either 'plain' or 'html'.
   */
  function getFormat();

  /**
   * Returns the recipent of this newsletter mail.
   *
   * @return
   *   The recipient mail address(es) of this newsletter as a string.
   */
  function getRecipient();

  /**
   * The language that should be used for this newsletter mail.
   */
  function getLanguage();

  /**
   * Returns an array of attachments for this newsletter mail.
   *
   * @return
   *   An array of managed file objects with properties uri, filemime and so on.
   */
  function getAttachments();

  /**
   * Returns the token context to be used with token replacements.
   *
   * @return
   *   An array of objects as required by token_replace().
   */
  function getTokenContext();

  /**
   * Returns the mail key to be used for drupal_mail().
   *
   * @return
   *   The mail key, either test or node.
   */
  function getKey();

  /**
   * Returns the formatted from mail address.
   */
  function getFromFormatted();

  /**
   * Returns the plain mail address.
   */
  function getFromAddress();

}

Members

Namesort descending Modifiers Type Description Overrides
SimplenewsSourceInterface::getAttachments function Returns an array of attachments for this newsletter mail. 2
SimplenewsSourceInterface::getBody function Returns the mail body. 2
SimplenewsSourceInterface::getFooter function Returns the mail footer. 2
SimplenewsSourceInterface::getFormat function Returns the mail format. 2
SimplenewsSourceInterface::getFromAddress function Returns the plain mail address. 2
SimplenewsSourceInterface::getFromFormatted function Returns the formatted from mail address. 2
SimplenewsSourceInterface::getHeaders function Returns the mail headers. 2
SimplenewsSourceInterface::getKey function Returns the mail key to be used for drupal_mail(). 2
SimplenewsSourceInterface::getLanguage function The language that should be used for this newsletter mail. 2
SimplenewsSourceInterface::getPlainBody function Returns the plaintext body. 2
SimplenewsSourceInterface::getPlainFooter function Returns the plain footer. 2
SimplenewsSourceInterface::getRecipient function Returns the recipent of this newsletter mail. 2
SimplenewsSourceInterface::getSubject function Returns the mail subject. 2
SimplenewsSourceInterface::getTokenContext function Returns the token context to be used with token replacements. 2