Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Notifier.php
Go to the documentation of this file.
1 <?php
7 
14 class Notifier implements \Magento\Sales\Model\Order\Creditmemo\NotifierInterface
15 {
19  private $senders;
20 
24  public function __construct(array $senders = [])
25  {
26  $this->senders = $senders;
27  }
28 
33  public function notify(
34  \Magento\Sales\Api\Data\OrderInterface $order,
36  \Magento\Sales\Api\Data\CreditmemoCommentCreationInterface $comment = null,
37  $forceSyncMode = false
38  ) {
39  foreach ($this->senders as $sender) {
40  $sender->send($order, $creditmemo, $comment, $forceSyncMode);
41  }
42  }
43 }
$order
Definition: order.php:55
notify(\Magento\Sales\Api\Data\OrderInterface $order, \Magento\Sales\Api\Data\CreditmemoInterface $creditmemo, \Magento\Sales\Api\Data\CreditmemoCommentCreationInterface $comment=null, $forceSyncMode=false)
Definition: Notifier.php:33