Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. <?php
  2.  
  3. namespace FunkyHelloControllerPath;
  4.  
  5. use MagentoFrameworkAppActionAction;
  6. use MagentoFrameworkAppResponseInterface;
  7. use MagentoFrameworkViewResultPageFactory;
  8. use MagentoFrameworkAppActionContext;
  9.  
  10. class HelloWorld extends Action
  11. {
  12. protected $pagefactory;
  13. public function __construct(Context $context, PageFactory $pageFactory)
  14. {
  15. $this->pagefactory=$pageFactory;
  16. Parent::__construct($context);
  17. }
  18. /**
  19. * Dispatch request
  20. *
  21. * @return MagentoFrameworkControllerResultInterface|ResponseInterface
  22. * @throws MagentoFrameworkExceptionNotFoundException
  23. */
  24. public function execute()
  25. {
  26. echo "testing? is working";
  27. return $this->pagefactory->create();
  28.  
  29. }
  30. }
  31.  
  32. <?php
  33. namespace FunkyHelloBlock;
  34. use MagentoFrameworkViewElementTemplate;
  35.  
  36. class Main extends Template
  37. {
  38. public function _prepareLayout()
  39. {
  40.  
  41.  
  42. }
  43.  
  44. }
  45.  
  46. <?xml version="1.0" ?>
  47. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
  48. "urn:magento:framework:Module/etc/routes.xsd">
  49. <router id="standard">
  50. <route id="funky" frontName="funky">
  51. <module name="Funky_Hello"/>
  52. </route>
  53. </router>
  54. </config>
  55.  
  56. <?xml version="1.0" ?>
  57. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
  58. "urn:magento:framework:Module/etc/module.xsd">
  59. <module name="Funky_Hello" setup_version="0.0.1"/>
  60. </config>
  61.  
  62. <?xml version="1.0"?>
  63. <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation=
  64. "urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  65. <body>
  66. <referenceContainer name="columns.top">
  67. <block class="FunkyHelloBlockMain"
  68. template="workin.phtml"
  69. name="funky_hello_Hell"/>
  70. </referenceContainer>
  71. <referenceContainer name="content">
  72. <block class="FunkyHelloBlockMain"
  73. template="Funky_Hello::blockContent.phtml"
  74. name="funky_hello_HelloWorld"/>
  75. </referenceContainer>
  76.  
  77. </body>
  78. </page>
  79.  
  80. <b>Hello World!</b>
  81.  
  82. <h1>It is working or not???</h1>
  83.  
  84.  
  85. <?php echo "nothing is happening why? ";?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement