Config.php 886 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * High-level interface for catalog attributes data that hides format from the client code
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Catalog\Model\Attribute;
  9. class Config
  10. {
  11. /**
  12. * @var \Magento\Catalog\Model\Attribute\Config\Data
  13. */
  14. protected $_dataStorage;
  15. /**
  16. * @param \Magento\Catalog\Model\Attribute\Config\Data $dataStorage
  17. */
  18. public function __construct(\Magento\Catalog\Model\Attribute\Config\Data $dataStorage)
  19. {
  20. $this->_dataStorage = $dataStorage;
  21. }
  22. /**
  23. * Retrieve names of attributes belonging to specified group
  24. *
  25. * @param string $groupName Name of an attribute group
  26. * @return array
  27. */
  28. public function getAttributeNames($groupName)
  29. {
  30. return $this->_dataStorage->get($groupName, []);
  31. }
  32. }