SilverCart\Model\Newsletter\AnonymousNewsletterRecipient
This is a datastore for recipients of the newsletter that are not registered or logged in as SilverCart customers.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class AnonymousNewsletterRecipient
extends DataObject
{
- // members
- private static array $db = ;
- private static string $table_name = 'SilvercartAnonymousNewsletterRecipient';
- // methods
- public string singular_name()
- public string plural_name()
- public static void add()
- public static void doConfirmationByHash()
- public static void removeByEmailAddress()
- public static boolean doesExist()
- public static boolean isOptInDoneFor()
- public static AnonymousNewsletterRecipient|boolean getByEmailAddress()
- public static AnonymousNewsletterRecipient|boolean getByHash()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db
—
array
Attributes. - $table_name
—
string
DB table name
Methods
public
- add() — Add a recipient to the list.
- doConfirmationByHash() — Sets the opt-in status to true for a recipient with the given hash.
- doesExist() — Checks if a recipient with the given email address exists already.
- getByEmailAddress() — Returns an AnonymousNewsletterRecipient object with the given email address.
- getByHash() — Returns an AnonymousNewsletterRecipient object with the given email address.
- isOptInDoneFor() — Checks if the opt-in is done for the recipient with the given email address.
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- removeByEmailAddress() — Remove a recipient from the list by his/her email address.
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.