1<?php 2/** 3 * Copyright since 2007 PrestaShop SA and Contributors 4 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA 5 * 6 * NOTICE OF LICENSE 7 * 8 * This source file is subject to the Open Software License (OSL 3.0) 9 * that is bundled with this package in the file LICENSE.md. 10 * It is also available through the world-wide-web at this URL: 11 * https://opensource.org/licenses/OSL-3.0 12 * If you did not receive a copy of the license and are unable to 13 * obtain it through the world-wide-web, please send an email 14 * to license@prestashop.com so we can send you a copy immediately. 15 * 16 * DISCLAIMER 17 * 18 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 19 * versions in the future. If you wish to customize PrestaShop for your 20 * needs please refer to https://devdocs.prestashop.com/ for more information. 21 * 22 * @author PrestaShop SA and Contributors <contact@prestashop.com> 23 * @copyright Since 2007 PrestaShop SA and Contributors 24 * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) 25 */ 26 27namespace PrestaShop\PrestaShop\Core\Domain\OrderMessage\Command; 28 29use PrestaShop\PrestaShop\Core\Domain\OrderMessage\ValueObject\OrderMessageId; 30 31/** 32 * Edit given order message 33 */ 34class EditOrderMessageCommand 35{ 36 /** 37 * @var OrderMessageId 38 */ 39 private $orderMessageId; 40 41 /** 42 * @var string[]|null 43 */ 44 private $localizedName; 45 46 /** 47 * @var string[]|null 48 */ 49 private $localizedMessage; 50 51 /** 52 * @param int $orderMessageId 53 * @param string[]|null $localizedName Array of localized name or null if name should not be edited 54 * @param string[]|null $localizedMessage Array of localized message or null if message should not be edited 55 */ 56 public function __construct(int $orderMessageId, array $localizedName = null, array $localizedMessage = null) 57 { 58 $this->orderMessageId = new OrderMessageId($orderMessageId); 59 $this->localizedName = $localizedName; 60 $this->localizedMessage = $localizedMessage; 61 } 62 63 /** 64 * @return OrderMessageId 65 */ 66 public function getOrderMessageId(): OrderMessageId 67 { 68 return $this->orderMessageId; 69 } 70 71 /** 72 * @return string[]|null 73 */ 74 public function getLocalizedName(): ?array 75 { 76 return $this->localizedName; 77 } 78 79 /** 80 * @return string[]|null 81 */ 82 public function getLocalizedMessage(): ?array 83 { 84 return $this->localizedMessage; 85 } 86} 87