Completed
Push — master ( 83b49e...84b670 )
by Nazar
04:49
created

Controller   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A browse_categories() 0 3 1
A browse_pages() 0 12 2
1
<?php
2
/**
3
 * @package   Static Pages
4
 * @category  modules
5
 * @author    Nazar Mokrynskyi <[email protected]>
6
 * @copyright Copyright (c) 2011-2016, Nazar Mokrynskyi
7
 * @license   MIT License, see license.txt
8
 */
9
namespace cs\modules\Static_pages\admin;
10
use
11
	h,
12
	cs\Language\Prefix,
13
	cs\Page,
14
	cs\modules\Static_pages\Categories;
15
16
class Controller {
17
	/**
18
	 * @return string
19
	 */
20
	public static function browse_categories () {
21
		return h::cs_static_pages_admin_categories_list();
22
	}
23
	/**
24
	 * @param \cs\Request $Request
25
	 *
26
	 * @return string
27
	 */
28
	public static function browse_pages ($Request) {
29
		$L        = new Prefix('static_pages_');
30
		$category = $Request->route_ids(0);
31
		Page::instance()->title(
32
			$category ? Categories::instance()->get($category)['title'] : $L->root_category
33
		);
34
		return h::cs_static_pages_admin_pages_list(
35
			[
36
				'category' => $category
37
			]
38
		);
39
	}
40
}
41