Completed
Push — namespace2 ( 791eac...5c23fb )
by Fabio
08:41
created

TJuiSelectableTemplate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A instantiateIn() 0 4 1
1
<?php
2
/**
3
 * TJuiSelectable class file.
4
 *
5
 * @author Fabio Bas <ctrlaltca[at]gmail[dot]com>
6
 * @link https://github.com/pradosoft/prado
7
 * @copyright Copyright &copy; 2013-2014 PradoSoft
8
 * @license https://github.com/pradosoft/prado/blob/master/COPYRIGHT
9
 * @package Prado\Web\UI\JuiControls
10
 */
11
12
namespace Prado\Web\UI\JuiControls;
13
use Prado\Web\UI\ITemplate;
14
15
/**
16
 * TJuiSelectableTemplate class.
17
 *
18
 * TJuiSelectableTemplate is the default template for TJuiSelectableTemplate
19
 * item template.
20
 *
21
 * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
22
 * @package Prado\Web\UI\JuiControls
23
 * @since 3.1
24
 */
25
class TJuiSelectableTemplate extends \Prado\TComponent implements ITemplate
26
{
27
	private $_template;
28
29
	public function __construct($template)
30
	{
31
		$this->_template = $template;
32
	}
33
	/**
34
	 * Instantiates the template.
35
	 * It creates a {@link TDataList} control.
36
	 * @param TControl parent to hold the content within the template
37
	 */
38
	public function instantiateIn($parent)
39
	{
40
		$parent->getControls()->add($this->_template);
41
	}
42
}