Link.php 611 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Label & link block
  8. *
  9. * @method string getLabel()
  10. * @method string getItemUrl()
  11. * @method string getItemName()
  12. */
  13. namespace Magento\UrlRewrite\Block;
  14. class Link extends \Magento\Framework\View\Element\AbstractBlock
  15. {
  16. /**
  17. * Render output
  18. *
  19. * @return string
  20. */
  21. protected function _toHtml()
  22. {
  23. return '<p>' . $this->getLabel() . ' <a href="' . $this->getItemUrl() . '">' . $this->escapeHtml(
  24. $this->getItemName()
  25. ) . '</a></p>';
  26. }
  27. }