PropertyMapper.php 726 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Configurable product attribute property mapper
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\ConfigurableProduct\Model\ResourceModel\Setup;
  9. use Magento\Eav\Model\Entity\Setup\PropertyMapperAbstract;
  10. class PropertyMapper extends PropertyMapperAbstract
  11. {
  12. /**
  13. * Map input attribute properties to storage representation
  14. *
  15. * @param array $input
  16. * @param int $entityTypeId
  17. *
  18. * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  19. *
  20. * @return array
  21. */
  22. public function map(array $input, $entityTypeId)
  23. {
  24. return ['is_configurable' => $this->_getValue($input, 'is_configurable', 1)];
  25. }
  26. }