Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
  3. <router id="standard">
  4. <route id="victor" frontName="test">
  5. <module name="Victor_Template" />
  6. </route>
  7. </router>
  8. </config>
  9.  
  10. namespace VictorTemplateControllerPage;
  11.  
  12. use MagentoBackendAppActionContext;
  13. use MagentoFrameworkAppActionAction;
  14. use MagentoFrameworkControllerResultJsonFactory;
  15. use MagentoFrameworkViewResultPageFactory;
  16.  
  17. class View extends Action
  18. {
  19. protected $resultPageFactory;
  20.  
  21. function __construct(Context $context, PageFactory $resultPageFactory){
  22. $this->resultPageFactory = $resultPageFactory;
  23. parent::__construct($context);
  24. }
  25.  
  26. public function execute(){
  27. return $this->resultPageFactory->create();
  28. }
  29. }
  30.  
  31. <?xml version="1.0" ?>
  32. <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  33. <body>
  34. <referenceContainer name="content">
  35. <block class="VictorTemplateBlockPageView" name="page.view" template="Victor_Template::page/view.phtml"/>
  36. </referenceContainer>
  37. </body>
  38. </page>
  39.  
  40. <h1>Hello World!</h1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement