Exception.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Eav\Model\Entity\Attribute;
  7. /**
  8. * EAV entity attribute exception
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. class Exception extends \Magento\Framework\Exception\LocalizedException
  14. {
  15. /**
  16. * Eav entity attribute
  17. *
  18. * @var string
  19. */
  20. protected $_attributeCode;
  21. /**
  22. * Eav entity attribute part
  23. * attribute|backend|frontend|source
  24. *
  25. * @var string
  26. */
  27. protected $_part;
  28. /**
  29. * Set Eav entity attribute
  30. *
  31. * @param string $attribute
  32. * @return $this
  33. * @codeCoverageIgnore
  34. */
  35. public function setAttributeCode($attribute)
  36. {
  37. $this->_attributeCode = $attribute;
  38. return $this;
  39. }
  40. /**
  41. * Set Eav entity attribute type
  42. *
  43. * @param string $part
  44. * @return $this
  45. * @codeCoverageIgnore
  46. */
  47. public function setPart($part)
  48. {
  49. $this->_part = $part;
  50. return $this;
  51. }
  52. /**
  53. * Retrieve Eav entity attribute
  54. *
  55. * @return string
  56. * @codeCoverageIgnore
  57. */
  58. public function getAttributeCode()
  59. {
  60. return $this->_attributeCode;
  61. }
  62. /**
  63. * Retrieve Eav entity attribute part
  64. *
  65. * @return string
  66. * @codeCoverageIgnore
  67. */
  68. public function getPart()
  69. {
  70. return $this->_part;
  71. }
  72. }