Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // @codingStandardsIgnoreFile
- namespace VendorOptionsImportBlockAdminhtmlItemsEditTab;
- use MagentoBackendBlockWidgetFormGeneric;
- use MagentoBackendBlockWidgetTabTabInterface;
- class Main extends Generic implements TabInterface
- {
- /**
- * {@inheritdoc}
- */
- public function getTabLabel()
- {
- return __('Item Information');
- }
- /**
- * {@inheritdoc}
- */
- public function getTabTitle()
- {
- return __('Item Information');
- }
- /**
- * {@inheritdoc}
- */
- public function canShowTab()
- {
- return true;
- }
- /**
- * {@inheritdoc}
- */
- public function isHidden()
- {
- return false;
- }
- /**
- * Prepare form before rendering HTML
- *
- * @return $this
- * @SuppressWarnings(PHPMD.NPathComplexity)
- * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
- */
- protected function _prepareForm()
- {
- $model = $this->_coreRegistry->registry('current_pinkblue_optionsimport_items');
- /** @var MagentoFrameworkDataForm $form */
- $form = $this->_formFactory->create();
- $form->setHtmlIdPrefix('item_');
- $fieldset = $form->addFieldset('base_fieldset', ['legend' => __('Import File Information')]);
- if ($model->getId()) {
- $fieldset->addField('id', 'hidden', ['name' => 'id']);
- }
- $fieldset->addField(
- 'pbimport',
- 'text',
- ['name' => 'pbimport', 'label' => __('Import File Name'), 'title' => __('File Name'), 'required' => true ]
- );
- $fieldset->addField(
- 'file',
- 'file',
- [
- 'name' => 'file',
- 'label' => __('NewOptions'),
- 'title' => __('New Options'),
- 'required' => true,
- ]
- );
- $form->setValues($model->getData());
- $this->setForm($form);
- return parent::_prepareForm();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement