EmailNotificationInterface.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Customer\Model;
  7. use Magento\Customer\Api\Data\CustomerInterface;
  8. use Magento\Framework\Exception\LocalizedException;
  9. /**
  10. * @api
  11. * @since 100.1.0
  12. */
  13. interface EmailNotificationInterface
  14. {
  15. /**
  16. * Constants for the type of new account email to be sent
  17. */
  18. const NEW_ACCOUNT_EMAIL_REGISTERED = 'registered';
  19. /**
  20. * Welcome email, when password setting is required
  21. */
  22. const NEW_ACCOUNT_EMAIL_REGISTERED_NO_PASSWORD = 'registered_no_password';
  23. /**
  24. * Welcome email, when confirmation is enabled
  25. */
  26. const NEW_ACCOUNT_EMAIL_CONFIRMATION = 'confirmation';
  27. /**
  28. * Confirmation email, when account is confirmed
  29. */
  30. const NEW_ACCOUNT_EMAIL_CONFIRMED = 'confirmed';
  31. /**
  32. * Send notification to customer when email and/or password changed
  33. *
  34. * @param CustomerInterface $savedCustomer
  35. * @param string $origCustomerEmail
  36. * @param bool $isPasswordChanged
  37. * @return void
  38. * @since 100.1.0
  39. */
  40. public function credentialsChanged(
  41. CustomerInterface $savedCustomer,
  42. $origCustomerEmail,
  43. $isPasswordChanged = false
  44. );
  45. /**
  46. * Send email with new customer password
  47. *
  48. * @param CustomerInterface $customer
  49. * @return void
  50. * @since 100.1.0
  51. */
  52. public function passwordReminder(CustomerInterface $customer);
  53. /**
  54. * Send email with reset password confirmation link
  55. *
  56. * @param CustomerInterface $customer
  57. * @return void
  58. * @since 100.1.0
  59. */
  60. public function passwordResetConfirmation(CustomerInterface $customer);
  61. /**
  62. * Send email with new account related information
  63. *
  64. * @param CustomerInterface $customer
  65. * @param string $type
  66. * @param string $backUrl
  67. * @param string $storeId
  68. * @param string $sendemailStoreId
  69. * @return void
  70. * @throws LocalizedException
  71. * @since 100.1.0
  72. */
  73. public function newAccount(
  74. CustomerInterface $customer,
  75. $type = self::NEW_ACCOUNT_EMAIL_REGISTERED,
  76. $backUrl = '',
  77. $storeId = 0,
  78. $sendemailStoreId = null
  79. );
  80. }