Answers for "create a configuration form in magento 2 admin interface"

PHP
0

create a configuration form in magento 2 admin interface

<?php

namespace [Name_Space]\[Your_Module]\Controller\Adminhtml\SampleForm;

class Index extends \Magento\Framework\App\Action\Action
{
/** @var \Magento\Framework\View\Result\PageFactory  */
protected $resultPageFactory;
public function __construct(
     \Magento\Framework\App\Action\Context $context,
     \Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
     $this->resultPageFactory = $resultPageFactory;
     parent::__construct($context);
}
/**
* Load the page defined in view/adminhtml/layout/samplenewpage_sampleform_index.xml
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
     return $this->resultPageFactory->create();
}
}
Posted by: Guest on September-14-2021

Code answers related to "create a configuration form in magento 2 admin interface"

Browse Popular Code Answers by Language