AbstractElement.php 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Component\Form\Element;
  7. use Magento\Ui\Component\AbstractComponent;
  8. /**
  9. * Class AbstractElement
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. abstract class AbstractElement extends AbstractComponent implements ElementInterface
  15. {
  16. /**
  17. * @return string
  18. */
  19. public function getHtmlId()
  20. {
  21. return '';
  22. }
  23. /**
  24. * @return string|int
  25. */
  26. public function getValue()
  27. {
  28. return $this->getData('value');
  29. }
  30. /**
  31. * @return string
  32. */
  33. public function getFormInputName()
  34. {
  35. return $this->getData('input_name');
  36. }
  37. /**
  38. * @return bool
  39. */
  40. public function isReadonly()
  41. {
  42. return (bool) $this->getData('readonly');
  43. }
  44. /**
  45. * @return string
  46. */
  47. public function getCssClasses()
  48. {
  49. return $this->getData('css_classes');
  50. }
  51. }