Passed
Push — develop ( f31b27...ac6bc8 )
by Jens
03:16
created

ConfigurationRouting   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
dl 0
loc 23
c 0
b 0
f 0
rs 10
wmc 2
lcom 0
cbo 6

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
1
<?php
2
/**
3
 * User: jensk
4
 * Date: 30-1-2017
5
 * Time: 12:59
6
 */
7
8
namespace library\components\cms;
9
10
11
use library\cc\Request;
12
use library\components\cms\configuration\ApplicationComponentRouting;
13
use library\components\cms\configuration\BricksRouting;
14
use library\components\cms\configuration\DocumentTypeRouting;
15
use library\components\cms\configuration\ImageSetRouting;
16
use library\components\cms\configuration\UsersRouting;
17
use library\components\CmsComponent;
18
19
class ConfigurationRouting implements CmsRouting
20
{
21
	/**
22
	 * ConfigurationRouting constructor.
23
	 *
24
	 * @param Request $request
25
	 * @param String $relativeCmsUri
26
	 * @param CmsComponent $cmsComponent
27
	 */
28
	public function __construct($request, $relativeCmsUri, $cmsComponent)
29
	{
30
		if ($relativeCmsUri == '/configuration') {
31
			$cmsComponent->subTemplate = 'cms/configuration';
32
			$cmsComponent->setParameter(CmsCOmponent::PARAMETER_MAIN_NAV_CLASS, CmsComponent::PARAMETER_CONFIGURATION);
33
		}
34
35
		new UsersRouting($request, $relativeCmsUri, $cmsComponent);
36
		new DocumentTypeRouting($request, $relativeCmsUri, $cmsComponent);
37
		new BricksRouting($request, $relativeCmsUri, $cmsComponent);
38
		new ImageSetRouting($request, $relativeCmsUri, $cmsComponent);
39
		new ApplicationComponentRouting($request, $relativeCmsUri, $cmsComponent);
40
	}
41
}