FormSmallController::indexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 14
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Anax\HTMLForm;
4
5
/**
6
 * Anax base class for wrapping sessions.
7
 *
8
 */
9
class FormSmallController
10
{
11
    use \Anax\DI\TInjectionAware;
12
13
14
15
    /**
16
     * Index action using external form.
17
     *
18
     */
19
    public function indexAction()
20
    {
21
        $this->di->session();
22
23
        $form = new \Anax\HTMLForm\CFormExample();
24
        $form->setDI($this->di);
25
        $form->check();
26
27
        $this->di->theme->setTitle("Testing CForm with Anax");
28
        $this->di->views->add('default/page', [
29
            'title' => "Try out a form using CForm",
30
            'content' => $form->getHTML()
31
        ]);
32
    }
33
}
34