Guest User

Untitled

a guest
Oct 4th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <?php
  2. namespace Vendor\Namespace\Block\Adminhtml\Select\Edit;
  3.  
  4. class Form extends \Magento\Backend\Block\Widget\Form\Generic
  5. {
  6. protected $systemStore;
  7.  
  8. public function __construct(\Magento\Framework\Registry $registry,\Magento\Store\Model\System\Store $systemsStore,\Magento\Backend\Block\Template\Context $contexts,\Magento\Framework\Data\FormFactory $formsFactory,array $data = []) {
  9. $this->systemStore = $systemsStore;
  10. parent::__construct($contexts, $registry, $formsFactory, $data);
  11. }
  12.  
  13.  
  14. protected function _construct()
  15. {
  16. parent::_construct();
  17. $this->setTitle(__("Post Information"));
  18. $this->setId("select_form");
  19. }
  20.  
  21.  
  22. protected function _prepareForm()
  23. {
  24.  
  25. $form = $this->_formFactory->create(['data' => ['id' => 'select_form', 'action' => $this->getUrl("vendor_namespace/deal/new/"), 'method' => 'post']]);
  26. $form->setHtmlIdPrefix('select_');
  27. $fieldset = $form->addFieldset('base_fieldset',['legend' => __('Dealss Information'), 'class' => 'fieldset-wide']);
  28. $fieldset->addField('deal_title','text',['name' => 'deal_title','value'=> "", 'label' => __('Deal Title'), 'title' => __('Deal zTitle'), 'required' => false]);
  29. $form->setUseContainer(true);
  30. $this->setForm($form);
  31. return parent::_prepareForm();
  32. }
  33. }
Add Comment
Please, Sign In to add comment