![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-inventory-sales/Model/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\InventorySales\Model; use Magento\InventorySalesApi\Api\Data\SalesEventInterface; use Magento\Framework\Model\AbstractExtensibleModel; use Magento\InventorySalesApi\Api\Data\SalesEventExtensionInterface; /** * @inheritdoc */ class SalesEvent extends AbstractExtensibleModel implements SalesEventInterface { /** * @var string */ private $type; /** * @var string */ private $objectType; /** * @var string */ private $objectId; /** * SalesEvent constructor. * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory * @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory * @param string $type * @param string $objectType * @param string $objectId * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource * @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection * @param array $data * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, string $type, string $objectType, string $objectId, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [] ) { parent::__construct( $context, $registry, $extensionFactory, $customAttributeFactory, $resource, $resourceCollection, $data ); $this->type = $type; $this->objectType = $objectType; $this->objectId = $objectId; } /** * @inheritdoc */ public function getType(): string { return $this->type; } /** * @inheritdoc */ public function getObjectType(): string { return $this->objectType; } /** * @inheritdoc */ public function getObjectId(): string { return $this->objectId; } /** * @inheritdoc */ public function getExtensionAttributes(): ?SalesEventExtensionInterface { $extensionAttributes = $this->_getExtensionAttributes(); if (null === $extensionAttributes) { $extensionAttributes = $this->extensionAttributesFactory->create(SalesEventInterface::class); $this->setExtensionAttributes($extensionAttributes); } return $extensionAttributes; } /** * @inheritdoc */ public function setExtensionAttributes(SalesEventExtensionInterface $extensionAttributes): void { $this->_setExtensionAttributes($extensionAttributes); } }