ActionFieldList::profileFieldList()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Apps\Controller\Admin\Profile;
4
5
use Apps\ActiveRecord\ProfileField;
6
use Ffcms\Core\Arch\View;
7
use Ffcms\Core\Network\Request;
8
use Ffcms\Core\Network\Response;
9
10
/**
11
 * Trait ActionFieldList
12
 * @package Apps\Controller\Admin\Profile
13
 * @property Request $request
14
 * @property Response $response
15
 * @property View $view
16
 */
17
trait ActionFieldList
18
{
19
    /**
20
     * Display profile add_fields list action
21
     * @return null|string
22
     */
23
    public function profileFieldList(): ?string
24
    {
25
        return $this->view->render('profile/field_list', [
26
            'records' => ProfileField::all()
27
        ]);
28
    }
29
}
30