Completed
Push — master ( 2507d2...3b83d2 )
by Aimeos
03:49
created

Languages   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setView() 0 10 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2016
6
 * @package Admin
7
 * @subpackage JQAdm
8
 */
9
10
11
namespace Aimeos\Admin\JQAdm\Common\Decorator;
12
13
14
/**
15
 * Languages decorator for JQAdm clients
16
 *
17
 * @package Admin
18
 * @subpackage JQAdm
19
 */
20
class Languages extends Base
21
{
22
	/**
23
	 * Sets the view object and adds the available languages
24
	 *
25
	 * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output
26
	 * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
27
	 */
28
	public function setView( \Aimeos\MW\View\Iface $view )
29
	{
30
		$extdir = dirname( dirname( dirname( dirname( dirname( dirname( dirname( dirname( __DIR__ ) ) ) ) ) ) ) );
31
		$aimeos = new \Aimeos\Bootstrap( array( $extdir ) );
32
33
		$view->languagesList = $aimeos->getI18nList( 'admin' );
34
35
		$this->getClient()->setView( $view );
36
		return $this;
37
	}
38
}
39