1 | <?php |
||
2 | |||
3 | namespace Apps\Controller\Front; |
||
4 | |||
5 | use Extend\Core\Arch\Controller; |
||
6 | |||
7 | /** |
||
8 | * Class Main. Default website entry point |
||
9 | * @package Apps\Controller\Front |
||
10 | */ |
||
11 | class Main extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * Before action method call injection |
||
15 | */ |
||
16 | public function before() |
||
17 | { |
||
18 | //self::$layout = 'other.php'; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Default index action |
||
23 | * @return null|string |
||
24 | */ |
||
25 | public function actionIndex() |
||
26 | { |
||
27 | $this->wtf = 'Test global variable'; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
28 | |||
29 | return $this->view->render('main/index', ['t1' => 'test1', 't2' => 'test2']); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Pass id inside example |
||
34 | * @param int $id |
||
35 | */ |
||
36 | public function actionRead($id) |
||
37 | { |
||
38 | echo "Action read called" . $id; |
||
39 | } |
||
40 | } |
||
41 |