Popup.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Msrp\Block;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. class Popup extends \Magento\Framework\View\Element\Template
  12. {
  13. /**
  14. * @var \Magento\Msrp\Model\Config
  15. */
  16. protected $config;
  17. /**
  18. * @param \Magento\Framework\View\Element\Template\Context $context
  19. * @param \Magento\Msrp\Model\Config $config
  20. * @param array $data
  21. */
  22. public function __construct(
  23. \Magento\Framework\View\Element\Template\Context $context,
  24. \Magento\Msrp\Model\Config $config,
  25. array $data = []
  26. ) {
  27. $this->config = $config;
  28. parent::__construct($context, $data);
  29. }
  30. /**
  31. * @return bool
  32. */
  33. public function isEnabled()
  34. {
  35. return $this->config->isEnabled();
  36. }
  37. /**
  38. * @return string
  39. */
  40. public function getExplanationMessage()
  41. {
  42. return $this->config->getExplanationMessage();
  43. }
  44. /**
  45. * @return string
  46. */
  47. public function getExplanationMessageWhatsThis()
  48. {
  49. return $this->config->getExplanationMessageWhatsThis();
  50. }
  51. }