AbstractModel.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Model;
  7. use Magento\Framework\Api\AttributeValueFactory;
  8. use Magento\Framework\Model\AbstractExtensibleModel;
  9. /**
  10. * Sales abstract model
  11. * Provide date processing functionality
  12. *
  13. * @api
  14. * @SuppressWarnings(PHPMD.NumberOfChildren)
  15. * @since 100.0.2
  16. */
  17. abstract class AbstractModel extends AbstractExtensibleModel
  18. {
  19. /**
  20. * @param \Magento\Framework\Model\Context $context
  21. * @param \Magento\Framework\Registry $registry
  22. * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
  23. * @param AttributeValueFactory $customAttributeFactory
  24. * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
  25. * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
  26. * @param array $data
  27. */
  28. public function __construct(
  29. \Magento\Framework\Model\Context $context,
  30. \Magento\Framework\Registry $registry,
  31. \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
  32. AttributeValueFactory $customAttributeFactory,
  33. \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
  34. \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
  35. array $data = []
  36. ) {
  37. parent::__construct(
  38. $context,
  39. $registry,
  40. $extensionFactory,
  41. $customAttributeFactory,
  42. $resource,
  43. $resourceCollection,
  44. $data
  45. );
  46. }
  47. /**
  48. * Returns _eventObject
  49. *
  50. * @return string
  51. */
  52. public function getEventObject()
  53. {
  54. return $this->_eventObject;
  55. }
  56. }