PHP Класс OrderEmailNotifier, silvershop-core

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$debugMode boolean
$order Order

Открытые методы

Метод Описание
__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 )

Защищенные методы

Метод Описание
buildEmail ( string $template, string $subject ) : Email

Описание методов

__construct() публичный Метод

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

buildEmail() защищенный Метод

protected buildEmail ( string $template, string $subject ) : Email
$template string
$subject string
Результат Email

config() публичный статический Метод

public static config ( )

create() публичный статический Метод

public static create ( Order $order ) : OrderEmailNotifier
$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
public sendConfirmation ( )

sendEmail() публичный Метод

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
Результат boolean

sendReceipt() публичный Метод

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

sendStatusChange() публичный Метод

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 setDebugMode ( $bool )
$bool

Описание свойств

$debugMode защищенное свойство

protected bool $debugMode
Результат boolean

$order защищенное свойство

protected Order $order
Результат Order