Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Commit 9709cbc

Browse files
committed
First frontend controller
1 parent 8e97642 commit 9709cbc

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

Controller/Index/Index.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* Copyright © 2017 Magefan ([email protected]). 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+
namespace Magefan\Faq\Controller\Index;
9+
10+
/**
11+
* FAQ home page view
12+
*/
13+
class Index extends \Magento\Framework\App\Action\Action
14+
{
15+
/**
16+
* View FAQ homepage action
17+
*
18+
* @return \Magento\Framework\Controller\ResultInterface
19+
*/
20+
public function execute()
21+
{
22+
echo 'Hello World';
23+
exit();
24+
}
25+
26+
}

etc/frontend/routes.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © 2017 Magefan ([email protected]). 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+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
11+
<router id="standard">
12+
<route id="Magefan_Faq" frontName="faq">
13+
<module name="Magefan_Faq" />
14+
</route>
15+
</router>
16+
</config>

0 commit comments

Comments
 (0)