ContactForm.php 754 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Contact\Block;
  7. use Magento\Framework\View\Element\Template;
  8. /**
  9. * Main contact form block
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. class ContactForm extends Template
  15. {
  16. /**
  17. * @param Template\Context $context
  18. * @param array $data
  19. */
  20. public function __construct(Template\Context $context, array $data = [])
  21. {
  22. parent::__construct($context, $data);
  23. $this->_isScopePrivate = true;
  24. }
  25. /**
  26. * Returns action url for contact form
  27. *
  28. * @return string
  29. */
  30. public function getFormAction()
  31. {
  32. return $this->getUrl('contact/index/post', ['_secure' => true]);
  33. }
  34. }