Passed
Push — master ( 34a8e1...345dac )
by Mihail
04:51
created

ActionCategoryList::contentCategoryList()   A

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\Content;
4
5
6
use Apps\ActiveRecord\ContentCategory;
7
use Ffcms\Core\Arch\View;
8
use Ffcms\Core\Network\Request;
9
use Ffcms\Core\Network\Response;
10
11
/**
12
 * Class ActionCategoryList
13
 * @package Apps\Controller\Admin\Content
14
 * @property Request $request
15
 * @property Response $response
16
 * @property View $view
17
 */
18
trait ActionCategoryList
19
{
20
    /**
21
     * Display category list
22
     * @return string|null
23
     */
24
    public function contentCategoryList(): ?string
25
    {
26
        return $this->view->render('content/category_list', [
27
            'categories' => ContentCategory::getSortedAll()
28
        ]);
29
    }
30
31
}