PHP Class OrderEmailNotifier, silvershop-core

Afficher le fichier Open project: burnbright/silverstripe-shop Class Usage Examples

Protected Properties

Свойство Type Description
$debugMode boolean
$order Order

Méthodes publiques

Méthode Description
__construct ( Order $order ) Assign the order to a local variable
config ( )
create ( Order $order ) : OrderEmailNotifier
sendAdminNotification ( ) Notify store owner about new order.
sendCancelNotification ( ) Sends an email to the admin that an order has been cancelled
sendConfirmation ( ) Send customer a confirmation that the order has been received
sendEmail ( $template, $subject, $copyToAdmin = true ) : boolean Send a mail of the order to the client (and another to the admin).
sendReceipt ( ) Send customer an order receipt email.
sendStatusChange ( string $title, string $note = null ) Send an email to the customer containing the latest note of {@link OrderStatusLog} and the current status.
setDebugMode ( $bool )

Méthodes protégées

Méthode Description
buildEmail ( string $template, string $subject ) : Email

Method Details

__construct() public méthode

Assign the order to a local variable
public __construct ( Order $order )
$order Order

buildEmail() protected méthode

protected buildEmail ( string $template, string $subject ) : Email
$template string
$subject string
Résultat Email

config() public static méthode

public static config ( )

create() public static méthode

public static create ( Order $order ) : OrderEmailNotifier
$order Order
Résultat OrderEmailNotifier

sendAdminNotification() public méthode

Notify store owner about new order.

sendCancelNotification() public méthode

Sends an email to the admin that an order has been cancelled

sendConfirmation() public méthode

Send customer a confirmation that the order has been received
public sendConfirmation ( )

sendEmail() public méthode

Send a mail of the order to the client (and another to the admin).
public sendEmail ( $template, $subject, $copyToAdmin = true ) : boolean
$template - the class name of the email you wish to send
$subject - subject of the email
$copyToAdmin - true by default, whether it should send a copy to the admin
Résultat boolean

sendReceipt() public méthode

Precondition: The order payment has been successful
public sendReceipt ( )

sendStatusChange() public méthode

Send an email to the customer containing the latest note of {@link OrderStatusLog} and the current status.
public sendStatusChange ( string $title, string $note = null )
$title string Subject for email
$note string Optional note-content (instead of using the OrderStatusLog)

setDebugMode() public méthode

public setDebugMode ( $bool )
$bool

Property Details

$debugMode protected_oe property

protected bool $debugMode
Résultat boolean

$order protected_oe property

protected Order $order
Résultat Order