AttributeValueFactory.php 977 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Factory class for \Magento\Framework\Authorization
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Api;
  9. use Magento\Framework\ObjectManagerInterface;
  10. class AttributeValueFactory
  11. {
  12. /**
  13. * Entity class name
  14. */
  15. const CLASS_NAME = \Magento\Framework\Api\AttributeValue::class;
  16. /**
  17. * Object Manager instance
  18. *
  19. * @var ObjectManagerInterface
  20. */
  21. protected $_objectManager = null;
  22. /**
  23. * Factory constructor
  24. *
  25. * @param ObjectManagerInterface $objectManager
  26. */
  27. public function __construct(ObjectManagerInterface $objectManager)
  28. {
  29. $this->_objectManager = $objectManager;
  30. }
  31. /**
  32. * Create class instance with specified parameters
  33. *
  34. * @return AttributeValue
  35. */
  36. public function create()
  37. {
  38. return $this->_objectManager->create(self::CLASS_NAME, ['data' => []]);
  39. }
  40. }