Form.php 999 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © 2015 Ihor Vansach (ihor@magefan.com). All rights reserved.
  4. * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
  5. *
  6. * Glory to Ukraine! Glory to the heroes!
  7. */
  8. namespace Magefan\Blog\Block\Adminhtml\Post\Edit;
  9. /**
  10. * Adminhtml cms page edit form block
  11. *
  12. * @author Magento Core Team <core@magentocommerce.com>
  13. */
  14. class Form extends \Magento\Backend\Block\Widget\Form\Generic
  15. {
  16. /**
  17. * Prepare form
  18. *
  19. * @return $this
  20. */
  21. protected function _prepareForm()
  22. {
  23. /** @var \Magento\Framework\Data\Form $form */
  24. $form = $this->_formFactory->create([
  25. 'data' => [
  26. 'id' => 'edit_form',
  27. 'action' => $this->getData('action'),
  28. 'method' => 'post',
  29. 'enctype' => 'multipart/form-data',
  30. ]
  31. ]);
  32. $form->setUseContainer(true);
  33. $this->setForm($form);
  34. return parent::_prepareForm();
  35. }
  36. }