This repository was archived by the owner on Jun 7, 2022. It is now read-only.
File tree 4 files changed +52
-2
lines changed
4 files changed +52
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2017 Magefan (support@magefan.com). All rights reserved.
4
+ * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5
+ *
6
+ * Glory to Ukraine! Glory to the heroes!
7
+ */
8
+
9
+ namespace Magefan \Faq \Block ;
10
+
11
+ /**
12
+ * Faq home block
13
+ */
14
+ class Index extends \Magento \Framework \View \Element \Template
15
+ {
16
+ /**
17
+ * Retrieve welcome text
18
+ * @return string
19
+ */
20
+ public function getWelcomeText ()
21
+ {
22
+ return 'Hello World ' ;
23
+ }
24
+ }
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ class Index extends \Magento\Framework\App\Action\Action
19
19
*/
20
20
public function execute ()
21
21
{
22
- echo ' Hello World ' ;
23
- exit ();
22
+ $ this -> _view -> loadLayout () ;
23
+ $ this -> _view -> renderLayout ();
24
24
}
25
25
26
26
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright © 2017 Magefan (support@magefan.com). All rights reserved.
5
+ * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
6
+ *
7
+ * Glory to Ukraine! Glory to the heroes!
8
+ */
9
+ -->
10
+ <page xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" layout =" 2columns-left" xsi : noNamespaceSchemaLocation =" urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
11
+ <body >
12
+ <referenceContainer name =" content" >
13
+ <block class =" Magefan\Faq\Block\Index" name =" faq.list" template =" Magefan_Faq::index.phtml" />
14
+ </referenceContainer >
15
+ </body >
16
+ </page >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2017 Magefan (support@magefan.com). All rights reserved.
4
+ * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5
+ *
6
+ * Glory to Ukraine! Glory to the heroes!
7
+ */
8
+ ?>
9
+
10
+ <h1><?php echo $ block ->escapeHtml ($ block ->getWelcomeText ()) ?> </h1>
You can’t perform that action at this time.
0 commit comments