You are here

interface EmailConfirmerManagerInterface in Email confirmer 8

Email confirmation service interface.

Hierarchy

Expanded class hierarchy of EmailConfirmerManagerInterface

All classes that implement EmailConfirmerManagerInterface

1 file declares its use of EmailConfirmerManagerInterface
UserEmailChangeCancelForm.php in email_confirmer_user/src/Form/UserEmailChangeCancelForm.php

File

src/EmailConfirmerManagerInterface.php, line 8

Namespace

Drupal\email_confirmer
View source
interface EmailConfirmerManagerInterface {

  /**
   * Starts an email confirmation process.
   *
   * Existing confirmation for the given email address will be used if it is in
   * pending status, otherwise a new one will be created. Confirmation request
   * email is sent by this method.
   *
   * @param string $email
   *   Email address to be confirmed.
   * @param array $data
   *   An optional property map to store with the confirmation.
   * @param string $realm
   *   A realm to which this confirmation belongs. Tipically, a module name.
   *
   * @return \Drupal\email_confirmer\EmailConfirmationInterface
   *   The email confirmation entity.
   */
  public function confirm($email, array $data = [], $realm = '');

  /**
   * Search for existent confirmation entities for a given email address.
   *
   * @param string $email
   *   The email address.
   * @param string $status
   *   Filter by confirmation status.
   * @param int $limit
   *   Max results count. Defaults to no limit.
   * @param string $realm
   *   A realm to filter by.
   *
   * @return \Drupal\email_confirmer\EmailConfirmationInterface[]
   *   Array of confirmations found, most recent first. Empty array if none
   *   found.
   */
  public function getConfirmations($email, $status = FALSE, $limit = 0, $realm = '');

  /**
   * Search for the recent confirmation for a given email address.
   *
   * @param string $email
   *   The email address.
   * @param string $status
   *   Filter by confirmation status.
   * @param string $realm
   *   A realm to filter by.
   *
   * @return \Drupal\email_confirmer\EmailConfirmationInterface
   *   The email confirmation entity. NULL if not found.
   */
  public function getConfirmation($email, $status = FALSE, $realm = '');

  /**
   * Creates a new email confirmation entity.
   *
   * @param string $email
   *   The email address to confirm.
   *
   * @return \Drupal\email_confirmer\EmailConfirmationInterface
   *   The new email confirmation entity.
   */
  public function createConfirmation($email);

}

Members

Namesort descending Modifiers Type Description Overrides
EmailConfirmerManagerInterface::confirm public function Starts an email confirmation process. 1
EmailConfirmerManagerInterface::createConfirmation public function Creates a new email confirmation entity. 1
EmailConfirmerManagerInterface::getConfirmation public function Search for the recent confirmation for a given email address. 1
EmailConfirmerManagerInterface::getConfirmations public function Search for existent confirmation entities for a given email address. 1