MinimalNewsletterSubscriptionService

Implements \NewsletterSubscriptionServiceInterface

Interface MinimalNewsletterSubscriptionService

category

System

package

NewsletterSubscription

Methods

MinimalNewsletterSubscriptionService constructor.

__construct(\CI_DB_query_builder $db) 

Arguments

$db

\CI_DB_query_builder

Creates a newsletter subscription instance from raw data from the database.

createNewsletterSubscriptionFromArray(array $newsletterSubscriptionData) : boolean|\NewsletterSubscription
Throws
\UnexpectedValueException
\InvalidArgumentException

Arguments

$newsletterSubscriptionData

array

Response

boolean|\NewsletterSubscription

Gets the newsletter subscription data by a given customer ID.

getSubscriptionByCustomerEmail(\CustomerEmailInterface $email) : boolean|\NewsletterSubscription
Throws
\UnexpectedValueException
\InvalidArgumentException

Arguments

Response

boolean|\NewsletterSubscription

Unsubscribes a customer from the newsletter.

unsubscribe(\CustomerEmailInterface $email) 

Arguments

Properties

db

db : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder