Js.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Eav\Block\Adminhtml\Attribute\Edit;
  7. /**
  8. * Eav Attribute Block with additional js scripts in template
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Js extends \Magento\Backend\Block\Template
  13. {
  14. /**
  15. * Js template
  16. *
  17. * @var string
  18. */
  19. protected $_template = 'Magento_Eav::attribute/edit/js.phtml';
  20. /**
  21. * @var \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype
  22. */
  23. private $inputtype;
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public function __construct(
  28. \Magento\Backend\Block\Template\Context $context,
  29. \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype $inputtype,
  30. array $data = []
  31. ) {
  32. $this->inputtype = $inputtype;
  33. parent::__construct($context, $data);
  34. }
  35. /**
  36. * @deprecated 102.0.0 Misspelled method
  37. * @see getCompatibleInputTypes
  38. */
  39. public function getComaptibleInputTypes()
  40. {
  41. return $this->getCompatibleInputTypes();
  42. }
  43. /**
  44. * Get compatible input types.
  45. *
  46. * @return array
  47. */
  48. public function getCompatibleInputTypes()
  49. {
  50. return $this->inputtype->getVolatileInputTypes();
  51. }
  52. /**
  53. * Get hints on input types.
  54. *
  55. * @return array
  56. */
  57. public function getInputTypeHints()
  58. {
  59. return $this->inputtype->getInputTypeHints();
  60. }
  61. }