Select.php 558 B

123456789101112131415161718192021222324252627282930313233
  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. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. class Select extends AbstractOptionsField
  12. {
  13. const NAME = 'select';
  14. /**
  15. * Get component name
  16. *
  17. * @return string
  18. */
  19. public function getComponentName()
  20. {
  21. return static::NAME;
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function getIsSelected($optionValue)
  27. {
  28. return $this->getValue() == $optionValue;
  29. }
  30. }