StepAbstract.php 893 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Block\Component\StepsWizard;
  7. /**
  8. * Abstract block for multi-step wizard UI
  9. */
  10. abstract class StepAbstract extends \Magento\Framework\View\Element\Template implements StepInterface
  11. {
  12. /**
  13. * @inheritdoc
  14. */
  15. public function getContent()
  16. {
  17. return $this->toHtml();
  18. }
  19. /**
  20. * @inheritdoc
  21. */
  22. public function getParentComponentName()
  23. {
  24. return $this->getParentBlock()->getComponentName();
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function getComponentName()
  30. {
  31. if (null === $this->getData('component_name')) {
  32. $this->setData('component_name', $this->getParentComponentName() . '_' . $this->getNameInLayout());
  33. }
  34. return $this->getData('component_name');
  35. }
  36. }