Form.php 903 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Review\Block\Adminhtml\Rating\Edit;
  7. /**
  8. * Rating edit form block
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Form extends \Magento\Backend\Block\Widget\Form\Generic
  13. {
  14. /**
  15. * @return $this
  16. */
  17. protected function _prepareForm()
  18. {
  19. /** @var \Magento\Framework\Data\Form $form */
  20. $form = $this->_formFactory->create(
  21. [
  22. 'data' => [
  23. 'id' => 'edit_form',
  24. 'action' => $this->getUrl('review/rating/save', ['id' => $this->getRequest()->getParam('id')]),
  25. 'method' => 'post',
  26. ],
  27. ]
  28. );
  29. $form->setUseContainer(true);
  30. $this->setForm($form);
  31. return parent::_prepareForm();
  32. }
  33. }