Context.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Eav\Model\Entity\Setup;
  7. /**
  8. * Constructor modification point for Magento\Eav\Model\Entity\Setup.
  9. *
  10. * All such context classes were introduced to allow for backwards compatible constructor modifications
  11. * of classes that were supposed to be extended by extension developers.
  12. *
  13. * Do not call methods of this class directly.
  14. *
  15. * As Magento moves from inheritance-based APIs all such classes will be deprecated together with their
  16. * corresponding abstract classes.
  17. *
  18. * @api
  19. * @codeCoverageIgnore
  20. * @since 100.0.2
  21. */
  22. class Context extends \Magento\Framework\Module\Setup\Context
  23. {
  24. /**
  25. * @var PropertyMapperInterface
  26. */
  27. protected $attributeMapper;
  28. /**
  29. * @param \Psr\Log\LoggerInterface $logger
  30. * @param \Magento\Framework\Event\ManagerInterface $eventManager
  31. * @param \Magento\Framework\App\ResourceConnection $appResource
  32. * @param \Magento\Framework\Module\Dir\Reader $modulesReader
  33. * @param \Magento\Framework\Module\ModuleListInterface $moduleList
  34. * @param \Magento\Framework\Module\ResourceInterface $resource
  35. * @param \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory
  36. * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
  37. * @param \Magento\Framework\Filesystem $filesystem
  38. * @param PropertyMapperInterface $attributeMapper
  39. * @SuppressWarnings(PHPMD.ExcessiveParameterList)
  40. */
  41. public function __construct(
  42. \Psr\Log\LoggerInterface $logger,
  43. \Magento\Framework\Event\ManagerInterface $eventManager,
  44. \Magento\Framework\App\ResourceConnection $appResource,
  45. \Magento\Framework\Module\Dir\Reader $modulesReader,
  46. \Magento\Framework\Module\ModuleListInterface $moduleList,
  47. \Magento\Framework\Module\ResourceInterface $resource,
  48. \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory,
  49. \Magento\Framework\Encryption\EncryptorInterface $encryptor,
  50. \Magento\Framework\Filesystem $filesystem,
  51. PropertyMapperInterface $attributeMapper
  52. ) {
  53. $this->attributeMapper = $attributeMapper;
  54. parent::__construct(
  55. $logger,
  56. $eventManager,
  57. $appResource,
  58. $modulesReader,
  59. $moduleList,
  60. $resource,
  61. $migrationFactory,
  62. $encryptor,
  63. $filesystem
  64. );
  65. }
  66. /**
  67. * @return PropertyMapperInterface
  68. */
  69. public function getAttributeMapper()
  70. {
  71. return $this->attributeMapper;
  72. }
  73. }